event-loop icon indicating copy to clipboard operation
event-loop copied to clipboard

Two working implementations

Open kelunik opened this issue 8 years ago • 10 comments

Following the FIG, I think it's good to have two working implementations passing all tests. I think we should have v0.4.0 and two working implementations, then tag v1.0.0.

kelunik avatar Dec 29 '16 15:12 kelunik

AFAIK we have a working implementation by @martinschroeder: koolkode/async: https://github.com/koolkode/async And our own, amp/loop: https://github.com/amphp/loop

which each pass all tests by their currently supported loops.

bwoebi avatar Dec 29 '16 15:12 bwoebi

@bwoebi We need tests for strict types. koolkode/async uses strict types currently.

kelunik avatar Dec 29 '16 15:12 kelunik

Yeah, that has been changed very recently, will add a test to event-loop-test repo

bwoebi avatar Dec 29 '16 15:12 bwoebi

Test added \cc @martinschroeder

bwoebi avatar Dec 29 '16 16:12 bwoebi

@bwoebi There's a typo in your ping.

I just tagged v0.4.0, so implementations can depend on that. I guess we will have a tag for the tests soon.

https://github.com/async-interop/event-loop/releases/tag/v0.4.0

kelunik avatar Dec 29 '16 16:12 kelunik

Thanks for letting me know. I removed strict types from the loop implementations and will have a look into version 0.4 of the loop spec today or maybe tomorrow.

I had to disable the test case for nested loop signal dispatching for the event extension due to an issiue with epoll. All other test cases are working out fine. My question is: Does the loop implementation still conform to the specification or do i have to remove the entire signal handling support from the event-extension-based loop?

ghost avatar Dec 29 '16 17:12 ghost

@martinschroeder I wonder, is there no workaround?

a) You could shut the warning up with @ and enable/disable the signal watchers when Driver::run() is entered/left (so that always the signal handler of the previous loop is taking priority if there was one) b) you could fall back to pcntl signals [ :-( ]

bwoebi avatar Dec 29 '16 17:12 bwoebi

@bwoebi I will have a look into the enable/disable solution tomorrow, sounds like a good idea to me.

ghost avatar Dec 29 '16 17:12 ghost

I think working on consumers is as important, if not more, than working on implementations. The best approach from here would be refactoring a collection of async PHP apps to use this event loop.

I've got a PHP snake game that uses React which I can try to rewrite - but I am incredibly limited on time at the moment!

AndrewCarterUK avatar Dec 30 '16 09:12 AndrewCarterUK

I migrated koolkode/async to event loop API version 0.4 and tagged a new release 0.2.10 that provides the event loop implementation.

ghost avatar Dec 30 '16 12:12 ghost