-
-
Save dom96/cec842c2d241c9e14d92 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
| proc doTest() = | |
| var retFuture = newFuture[int]() | |
| var myIter: iterator () {.closure.} | |
| iterator test() {.closure.} = | |
| var fut = p.connect(sock, "irc.freenode.org", TPort(6667)) | |
| fut.callback = | |
| proc (future: PFuture[int]) = | |
| if not myIter.finished: myIter() | |
| yield | |
| #var fut2 = p.recv(sock, 10) | |
| myIter = test | |
| myIter() | |
| doTest() | |
| while true: | |
| p.poll() |
Author
dom96
commented
Feb 8, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment