Hello Racketeers, it didn't take long before I hit another strange behavior when extensively using futures. The setup is relatively simple: I am processing a large fxvector/flvector and I am processing it on a line-by-line basis (the vectors themselves are width*height in nature). To avoid races I setup a (make-vector height #f) to serve as a vector of locks. Locking is simple:
(let lloop () (when (not (vector-cas! locks y #f #t)) (lloop))) .. do something ... (vector-set! locks y #f) Of course, the code in question is in 8 futures on my CPU and they are scheduled in parallel pretty consistently. Most of the time it works fine, but sometimes it just hangs with multiple CPU cores being utilized at 100% (I assume they are in the busy-wait "lloop"). The problem is I cannot isolate a minimal working example from that. The code in question is about 3000 LoC and the issue expresses itself only in about 1 in 30 times just after the program has started. The GUI thread is running and there are lots of flonum operations and lots of thrown away flonum results (meaning GC gets triggered quite often). Also I cannot trigger the same issue with unsafe-vector*-cas! - I'll look into the differences in the source. I see this with latest Racket 3m. Any suggestions how to approach finding the source of the problem are - as always - very welcome. Cheers, Dominik -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/0e6de88c-1d39-38fa-ea69-2043c4f4071b%40trustica.cz.