[mcclim-devel] [bug] Asynchronous ID-CHOICE-ERROR -- CLX or McCLIM?

Christophe Rhodes csr21 at cantab.net
Fri Aug 22 06:02:29 UTC 2008


"Andy Hefner" <ahefner at gmail.com> writes:

> Attached is a patch to CLX intending to address a race condition when
> multiple threads attempt to allocate a resource ID -
> DISPLAY-RESOURCE-ID-COUNT is incremented, but there is no locking to
> protect the slot, resulting in intermittent duplicate IDs and
> subsequent ID-CHOICE-ERROR. I've wrapped the allocation in a
> with-display, and done the same to the nearby
> deallocate-resource-id-internal for good measure. This should protect
> the incf in resourcealloc, the (setf gethash) in save-id, and the
> remhash in deallocate-resource-id-internal.

Thanks, pushed.

Best,

Christophe



More information about the mcclim-devel mailing list