1 Apr 2011 11:08
Re: with-timeout sucks
Gábor Melis <mega <at> retes.hu>
2011-04-01 09:08:20 GMT
2011-04-01 09:08:20 GMT
Robert Goldman <rpgoldman <at> sift.info> writes: > So what am I to do if I have a computational process that I may want to > choke off after a fixed amount of time? > > Seems like the WITH-TIMEOUT provides me no guarantee that unwinds will > proceed properly, but WITH-DEADLINE is not appropriate, because it's > only suitable for I/O timeouts. > > Sorry if these are obvious questions --- I've been programming mostly in > Allegro, with green threads, so I haven't had to worry about these > issues previously. Actually, async unwind - by its very nature - is a problem on Allegro CL as well (and, I'd hazard, on most implementations). I tend to use WITH-TIMEOUT only around side effect free computation or at least code whose side effects will be garbage after unwinding. I trust the lisp to be async unwind safe (method calls, IO, etc), but I certainly don't push it. ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
RSS Feed