<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p><span style="font-size: 12pt;">> </span><span style="font-size: 12pt;">In #endEntry, we could check for "Processor activeProcess == Project current uiProcess" to then use "Project current addDeferredUIMessage..." automatically.</span></p>
<p></p>
<div><br>
</div>
<p></p>
<p>But wouldn't violate that the #forceUpdate preference when a non-UI process blocks the image for a while?</p>
<p><br>
</p>
<p>Best,</p>
<p>Christoph</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel<br>
<b>Gesendet:</b> Montag, 25. Januar 2021 12:25:56<br>
<b>An:</b> squeak-dev<br>
<b>Betreff:</b> Re: [squeak-dev] Transcript error when forceUpdate: false (?)</font>
<div> </div>
</div>
<div>
<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
> <span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">It's simply not thread-safe.</span>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br>
</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Hmm... in particular, there is a side effect (i.e. layout update) in the window's pluggable text morph. Even if #forceUpdate is false.</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br>
</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">In #endEntry, we could check for "Processor activeProcess == Project current uiProcess" to then use "Project current addDeferredUIMessage..." automatically.</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br>
</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Best,</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Marcel</span></div>
<div class="mb_sig"></div>
<blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
<p style="color: #AAAAAA; margin-top: 10px;">Am 23.01.2021 21:05:05 schrieb Levente Uzonyi <leves@caesar.elte.hu>:</p>
<div style="font-family:Arial,Helvetica,sans-serif">On Fri, 22 Jan 2021, tim Rowledge wrote:<br>
<br>
><br>
><br>
>> On 2021-01-22, at 5:26 PM, David T. Lewis <lewis@mail.msen.com>wrote:<br>
>> <br>
>> On Fri, Jan 22, 2021 at 02:03:10PM -0600, jaromir wrote:<br>
>>> I ran the following in Squeak 5.3:<br>
>>> <br>
>>> TranscriptStream forceUpdate: false.<br>
>>> [ 10000 timesRepeat: [ Transcript show: 'x' ] ] forkAt: 39<br>
>>> <br>
>>> When the Transcript window fills up, 'Message not understood' and 'Assertion<br>
>>> failure' appear. I'm wondering is this a bug? Thanks. Jaromir<br>
>>> <br>
>>> <http: forum.world.stfilet372955screenshot_2021-01-22_205244.png=""><br>
>>> <br>
>> <br>
>> It certainly does appear to be a bug.<br>
><br>
> 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?<br>
<br>
It's simply not thread-safe.<br>
If you want it to be thread-safe, you can pass your message to the UI <br>
process to show it. Make sure your message is computed in its own process <br>
and is passed as a precomputed string to avoid other kinds of race <br>
conditions. E.g.:<br>
<br>
| theMessage |<br>
theMessage := 'Something very {1}.' format: { 'important' }.<br>
Project current addDeferredUIMessage: [ Transcript show: theMessage; cr ].<br>
<br>
<br>
Levente<br>
<br>
><br>
><br>
> tim<br>
> --<br>
> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim<br>
> The hardness of the butter is proportional to the softness of the bread.<br>
<br>
</http:></lewis@mail.msen.com></div>
</blockquote>
</div>
</div>
</body>
</html>