celluloid / floss

UNMAINTAINED: See celluloid/celluloid#779 - A Ruby implementation of the Raft consensus algorithm.
MIT License
77 stars 14 forks source link

Extract latches into Celluloid itself? #23

Open tarcieri opened 11 years ago

tarcieri commented 11 years ago

See also https://github.com/celluloid/celluloid-io/issues/89

The latches defined here:

https://github.com/celluloid/floss/blob/master/lib/floss/count_down_latch.rb https://github.com/celluloid/floss/blob/master/lib/floss/latch.rb

...are potentially generally useful. Should we extract them into Celluloid?

benlangfeld commented 11 years ago

This is a CountDownLatch implementation faithful to the Java API: https://github.com/benlangfeld/countdownlatch

Something more complete like that would be nice :) It already allows injection of a condition.

On 30 September 2013 20:07, Tony Arcieri notifications@github.com wrote:

See also celluloid/celluloid-io#89https://github.com/celluloid/celluloid-io/issues/89

The latches defined here:

https://github.com/celluloid/floss/blob/master/lib/floss/count_down_latch.rb https://github.com/celluloid/floss/blob/master/lib/floss/latch.rb

...are potentially generally useful. Should we extract them into Celluloid?

— Reply to this email directly or view it on GitHubhttps://github.com/celluloid/floss/issues/23 .

halorgium commented 11 years ago

@tarcieri I would be careful to make sure the implementations are thread-safe. My intuition suggests that they are not right now.

tarcieri commented 11 years ago

@halorgium we should of course be careful to vet whatever implementations we want to merge into Celluloid proper