andreasronge/neo4j — Issue #136: Rules are not be thread-safe
Author: dnagir
Created: 2012-01-16 22:54:13+00:00
State: open
Labels: bug, investigate

I just got a failing spec:

```
1) Neo4j::Node#rule rule node created from concurrent threads
Failure/Error: Reader.all.to_a.should =~ readers
expected collection contained: [#:0xdbb6e9>>]
actual collection contained: [#:0xdae687>>, #:0x154d7aa>>]
the extra elements were: [#:0xdae687>>]
# ./spec/rule/rule_spec.rb:94:in `(root)'
```

It hasn't happened before and it's not happening anymore. This is a clear sign of a race condition based on non-thread-safe implementation.

/cc @andreasronge