Re: [Chicken-users] Re: patch to with-*-*-file
On Sun, Aug 17, 2008 at 4:05 PM, Jörg F. Wittenberger [EMAIL PROTECTED] wrote: too bad. Once again a fix for the fix. This time I overlooked a now superflous assignment. ##sys#standard-{in,out}put are already handled specially (and stored in the thread-state), so this doesn't make things any more thread-safe than they already are. Additionally, it may not always be intended to close the port when an escaping continuation is used, as the current state could be re-entered. For this reaon, R5RS leaves the behaviour undefined in this case. cheers, felix ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Re: patch to with-*-*-file
Am Dienstag, den 19.08.2008, 08:59 +0200 schrieb felix winkelmann: On Sun, Aug 17, 2008 at 4:05 PM, Jörg F. Wittenberger [EMAIL PROTECTED] wrote: too bad. Once again a fix for the fix. This time I overlooked a now superflous assignment. ##sys#standard-{in,out}put are already handled specially (and stored in the thread-state), so this doesn't make things any more thread-safe than they already are. a) I'm confused: I know that those ports are in the thread state, but I'm confused about interaction of call/cc and threads: are dynamic-wind's all executed upon each thread switch or not at all? This is especially interesting wrt. to parameters too. b) I noticed meanwhile that this fix did at least not fix the problem I have: output from elsewhere appearing in the file I opened by with-output-to-file - probably because the output came from ##sys#schedule/switch c) my patch uses in with-*-*-file the same code structure as for instance unit ports with-*-*-string. Why should one do it this way and one the other way? Additionally, it may not always be intended to close the port when an escaping continuation is used, as the current state could be re-entered. I understand your remark, but I don't understand it's relationship to the code in question. IMHO the escaping continuation should not close the port. /Jörg ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Re: patch to with-*-*-file
On Tue, Aug 19, 2008 at 10:54 AM, Jörg F. Wittenberger [EMAIL PROTECTED] wrote: ##sys#standard-{in,out}put are already handled specially (and stored in the thread-state), so this doesn't make things any more thread-safe than they already are. a) I'm confused: I know that those ports are in the thread state, but I'm confused about interaction of call/cc and threads: are dynamic-wind's all executed upon each thread switch or not at all? They are not (of course). c) my patch uses in with-*-*-file the same code structure as for instance unit ports with-*-*-string. Why should one do it this way and one the other way? Now I was confused, sorry. The closing of ports has nothing to do with this, that was a mistake on my part. What I'm talking about is that your patch does not change thread-safety in any way. The internal variables holding ports are always thread local. cheers, felix ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users