Last active
October 1, 2019 18:20
-
-
Save akitaonrails/f0cd567a39164447340bbbda24fa68d0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unhandled exception: Cannot allocate new fiber stack: Cannot allocate memory (Errno) | |
GC Warning: Failed to expand heap by 2834432 bytes | |
GC Warning: Failed to expand heap by 790528 bytes | |
GC Warning: Out of Memory! Heap size: 5 MiB. Returning NULL! | |
Invalid memory access (signal 11) at address 0x60018 | |
[0x5614ba5a4176] ??? | |
[0x5614ba5a3e8f] __crystal_sigfault_handler +479 | |
[0x7fd6dde91890] ??? | |
[0x5614ba5931d5] ??? | |
[0x5614ba59259b] ??? | |
[0x5614ba591a06] ??? | |
[0x5614ba587560] ??? | |
[0x5614ba585272] ??? | |
[0x5614ba59e5db] ??? | |
[0x5614ba59cd15] ??? | |
[0x5614ba583b42] main +50 | |
[0x7fd6dd442b97] __libc_start_main +231 | |
[0x5614ba57ff1a] _start +42 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
channel = Channel(Int32).new | |
n = 101_000 | |
n.times do |_| | |
spawn do | |
sleep 0.001 # io block 1ms | |
channel.send 1 | |
end | |
end | |
total = 0 | |
n.times do | |
total += channel.receive | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment