-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async #15
Comments
Currently at work right now, but in short: It almost does work already. If you have larger requirements beyond a timer, let me know. We may need to On Wed, 4 Nov 2015 17:41 Aleks-Daniel Jakimenko notifications@github.com
|
Yeah, I've tried something like this: class AsyncTest {
has $.delay = 5;
method said ($e) {
next if $e.what !~~ / asyncstart /; # type “asyncstart” to test it
start {
loop {
sleep $!delay;
say 'test';
$e.msg: 'hello'
}
}
}
} But indeed, both It seems like |
My only requirement is quite simple. I'm doing something like a RSS notifier. On my side it simply reads a feed from time to time. All I need is a way to tell |
Yeah. Switching to IO::Socket::Async (or whatever it is called) should On Thu, 5 Nov 2015 11:41 Aleks-Daniel Jakimenko notifications@github.com
|
I pushed a pretty basic attempt I wrote while in a semi-lucid state last night.. It seems to work when I connect to an echo server, but Unreal won't let me connect past a few lines. Not sure what the issue is.. |
Did you recompile? There were changes associated with I'll test it soon, I hope. |
It works! That's it! However, to print stuff, it seems like I need an Event object (which is the only thing that has a convenient My ugly code above works though. |
I assume you can just capture the event in the promise/supply callback. You can also access Bot.conn directly. |
Yeah but it feels like |
Yes and no. Msg is a specific way to privmsg someone and involves the context of the event it is encapsulated in. I guess we could move the core functionality to TextUtil or something. Maybe attach it to the irc-connection role? Either way, you might want to just write out an example of the Api you envision using, and then I'll make it work. |
It seems like the whole design of |
Readme says:
That's from 2010. It seems like all of that stuff works quite well on MoarVM (or at least it is good enough!).
I need timed events…
The text was updated successfully, but these errors were encountered: