[squeak-dev] Transcript error when forceUpdate: false (?)
Levente Uzonyi
leves at caesar.elte.hu
Sat Jan 23 20:04:50 UTC 2021
On Fri, 22 Jan 2021, tim Rowledge wrote:
>
>
>> On 2021-01-22, at 5:26 PM, David T. Lewis <lewis at mail.msen.com> wrote:
>>
>> On Fri, Jan 22, 2021 at 02:03:10PM -0600, jaromir wrote:
>>> I ran the following in Squeak 5.3:
>>>
>>> TranscriptStream forceUpdate: false.
>>> [ 10000 timesRepeat: [ Transcript show: 'x' ] ] forkAt: 39
>>>
>>> When the Transcript window fills up, 'Message not understood' and 'Assertion
>>> failure' appear. I'm wondering is this a bug? Thanks. Jaromir
>>>
>>> <http://forum.world.st/file/t372955/Screenshot_2021-01-22_205244.png>
>>>
>>
>> It certainly does appear to be a bug.
>
> We had some discussion about it not so long ago; you can't use the Transcript to log bugs from Seaside very well, for example. Background processes, mutexs, that sort of thing. IIRC Levente offered an explanation?
It's simply not thread-safe.
If you want it to be thread-safe, you can pass your message to the UI
process to show it. Make sure your message is computed in its own process
and is passed as a precomputed string to avoid other kinds of race
conditions. E.g.:
| theMessage |
theMessage := 'Something very {1}.' format: { 'important' }.
Project current addDeferredUIMessage: [ Transcript show: theMessage; cr ].
Levente
>
>
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> The hardness of the butter is proportional to the softness of the bread.
More information about the Squeak-dev
mailing list
|