commit 4781c478630f3c19373aea69cca3d2efac8154ee Author: Matt Birkholz <p...@birchwood-abbey.net> Date: Tue Jun 23 11:42:13 2015 -0700
But there is no need for default/gc-flip to remove items from the queue. Flush-purification-queue! will know that its queue is "empty" when its head is in constant space. Thus the interrupt no longer modifies the queue, and the queuing process is serialized in the usual way. Naively reading from a data structure that another thread might be modifying is not OK even if all modifications are covered by a mutex. If you want to do this, then at the very least you must introduce memory barriers so that the modifications will be transmitted from the writer to the reader in a sane order -- or prove that the memory barriers are not necessary for other reasons. I'm also a little puzzled about the queue scheme. It seems like now we waste constant space for all the pairs that were used only for the purpose of queueing objects to be purified. _______________________________________________ MIT-Scheme-devel mailing list MIT-Scheme-devel@gnu.org https://lists.gnu.org/mailman/listinfo/mit-scheme-devel