Jump to content

Active object: Difference between revisions

m
removed note about differences from python version, i was mistaken when adding it
(add crystal solution)
m (removed note about differences from python version, i was mistaken when adding it)
Line 456:
puts ai.s
</lang>
 
Note: when <code>put</code>ting <code>ai.s</code> twice (once after the first sleep, another after the second) like in the Python solution, two slightly different values will be printed since Crystal's fibers work differently than Python's threads
 
Output:
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.