Hi Tom,<br><br>Thanks for the quick response!<br><br>I thought the semaphore gets set as the semaphore that is signaled later... well the code is complicated.<br><br>I have another question:<br>Semaphore&gt;&gt;waitTimeoutMSecs:
<br>| d |<br>&nbsp;&nbsp;&nbsp; d := Delay timeoutSemaphore: self afterMSecs: (anInteger max: 0).<br>&nbsp;&nbsp;&nbsp; self wait.<br>&nbsp;&nbsp;&nbsp; &quot;Signaling by the Delay here would over-signal the Sem.&quot;
<br>&nbsp;&nbsp;&nbsp; d unschedule.<br><br>A fix would need a sem for the sem I think... is that method usable?<br><br>Cheers again,<br>Georg<br><br><div class="gmail_quote">On Jan 5, 2008 12:37 AM, Tom Phoenix &lt;<a href="mailto:rootbeer@redcat.com">
rootbeer@redcat.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On Jan 4, 2008 2:58 PM, Georg Köster &lt;
<a href="mailto:georg.koester@gmail.com">georg.koester@gmail.com</a>&gt; wrote:<br><br>&gt; Delay timeoutSemaphore: s afterMSecs: 1.<br><br></div>Despite the comment in the source code, Delay<br>class&gt;&gt;timeoutSemaphore:afterMSecs: doesn&#39;t signal the given
<br>semaphore; in fact, it never uses that parameter. That method should<br>be deprecated, if not simply removed. I&#39;ve filed a bug report:<br><br> &nbsp; &nbsp;<a href="http://bugs.squeak.org/view.php?id=6834" target="_blank">http://bugs.squeak.org/view.php?id=6834
</a><br><div class="Ih2E3d"><br>&gt; I have this fix for my use-case: Avoid Delay&gt;&gt;timeoutSempaphore:afterMSecs:<br><br>&gt; |s|<br>&gt; s := Semaphore new.<br>&gt; [(Delay forSeconds:1) wait. s signal.] fork.<br>&gt; s wait.
<br>&gt; Transcript show: &#39;Now gets here - line will be printed&#39;; cr.<br><br>&gt; Resource intense, I know.<br><br></div>Why; because you used fork? Squeak processes don&#39;t work the way you<br>might think. I would recommend a solution along those exact lines.
<br><br>Hope this helps!<br><font color="#888888"><br>--Tom Phoenix<br><br></font></blockquote></div><br>