Skip to content

Commit

Permalink
trying to make poll a tiny bit easier to use
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Sessoms committed Oct 18, 2011
1 parent 8a5014e commit 99645b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/packages.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
:with-poll-items
:poll-items-aref :do-poll-items :poll-item-event-signaled-p
:poll
:event-types

:stopwatch-start :stopwatch-stop :with-stopwatch
:sleep
Expand Down
4 changes: 2 additions & 2 deletions src/zmq.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,11 @@ ITEMS."
(let ((,var (poll-items-aref ,items ,i)))
,@body))))

(defun poll-item-event-signaled-p (poll-item event)
(defun poll-item-event-signaled-p (poll-item &rest event)
"Return T if POLL-ITEM indicates that an event of type EVENT was detected
for the underlying socket or file descriptor or NIL if no event occurred."
(/= (logand (foreign-slot-value poll-item 'pollitem 'revents)
(foreign-bitfield-value 'event-types (list event))) 0))
(foreign-bitfield-value 'event-types event)) 0))

(defun poll (items nb-items timeout)
"Poll ITEMS with a timeout of TIMEOUT microseconds, -1 meaning no time
Expand Down

0 comments on commit 99645b8

Please sign in to comment.