methodmissing / eio Goto Github PK
View Code? Open in Web Editor NEWA libeio (http://software.schmorp.de/pkg/libeio.html) wrapper for Ruby
Home Page: http://github.com/methodmissing/eio
License: Other
A libeio (http://software.schmorp.de/pkg/libeio.html) wrapper for Ruby
Home Page: http://github.com/methodmissing/eio
License: Other
Currently the whole EM flips over:
/Library/Ruby/Gems/1.8/gems/eio-0.1/lib/eio/eventmachine.rb:13:in `poll': No such file or directory - /test/testfile (Errno::ENOENT)
from /Library/Ruby/Gems/1.8/gems/eio-0.1/lib/eio/eventmachine.rb:13:in `notify_readable'
from /Library/Ruby/Gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
from /Library/Ruby/Gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
from server.rb:7
Preparation
mkdir many
for i in {1..100000} ; do touch many/$i ; done
Failed
require 'eventmachine'
require 'eio/eventmachine'
EM.run do
EIO.eventmachine_handler
EIO.readdir('many') {|f| }
EIO.readdir('many') {|f| }
EM.add_timer(5){ EM.stop }
end
Mod list upon request
Minecraft 1.10.2 custom mod pack using Curse launcher
EIO textures vanish and reappear at will, see attached screen shot for an example.
How to replicate:
Place eio conduit down, in my example I'm using the farming station, placed 4 item conduits through the "floor" I built, and what you see are the textures missing.
Sometimes I can get them back for good by holding a conduit in my "active hand" and some times they only show when I am holding the conduit in "active hand" soon as I move off they vanish again.
This screenshot shows they laying on a floor, not through anything just placed three down in a row
I try this
path = "/tmp/asyncdl.out"
file = nil
EM.run do
EIO.eventmachine_handler # let libeio notify when there's result callbacks to invoke
# file = File.new('/tmp/asyncdl.out', 'w')
# EIO.write(file.fileno, "buf contents: hello") do |b|
# EIO.close(file.fileno) { EM.stop_event_loop }
# end
EIO.open(path, EIO::APPEND) do |fd|
EIO.write(fd, "buf contents: hello") do |b|
EIO.close(fd) { EM.stop_event_loop }
end
end
end
but got
/Library/Ruby/Gems/1.8/gems/eio-0.1/lib/eio/eventmachine.rb:13:in `poll': Bad file descriptor (Errno::EBADF)
from /Library/Ruby/Gems/1.8/gems/eio-0.1/lib/eio/eventmachine.rb:13:in `notify_readable'
from /Library/Ruby/Gems/1.8/gems/eventmachine-1.0.0.beta.4/lib/eventmachine.rb:179:in `run_machine'
from /Library/Ruby/Gems/1.8/gems/eventmachine-1.0.0.beta.4/lib/eventmachine.rb:179:in `run'
from asyndl-eio.rb:21
The issue is taken from: https://groups.google.com/forum/#!msg/eventmachine/oK74Pc92TvE/TX2lU0QvrBkJ
Below is a snippet which fails with:
./async_write.rb:8:in write': string contains null byte (ArgumentError) from ./async_write.rb:8:in
block (2 levels) in
call' from /usr/local/lib/ruby/gems/1.9.1/gems/eio-0.1/lib/eio/eventmachine.rb:13:in
poll'notify_readable' from /usr/local/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0.beta.4/lib/eventmachine.rb:179:in
run_machine'run' from ./async_write.rb:4:in
'
====== async_write.rb =======
require 'eventmachine'
require 'eio/eventmachine'
EM.run do
EIO.eventmachine_handler
EIO.open("./test.txt", EIO::RDWR|EIO::CREAT) do |fd|
EIO.write(fd, "buf contents: \0hello") do |b| # put the zero byte using \0
EM.stop_event_loop
end
end
end
This is a blocker.
This can be easily reproduced using
EM.run do
EIO.eventmachine_handler # let libeio notify when there's result callbacks to invoke
EIO.open(path, EIO::RDWR|EIO::CREAT) do |fd|
EIO.write(fd, "buf contents: \0hello") do |b| # put the zero byte using \0
EM.stop_event_loop
end
end
end
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.