(define (poll poll-items timeout/block) (if (null? poll-items) (error 'poll "null list passed for poll-items") (let ((result (%poll-sockets (lambda (i) (printf "Items: ~A~%" poll-items) (printf "Getting: ~A ~%" i) (poll-item-pointer (list-ref poll-items i))) (length poll-items) (case timeout/block ((#f) 0) ((#t) -1) (else timeout/block))))) (if (= result -1) (zmq-error 'poll) result)))) ) ;; output ...... ..... Getting: 0 Items: (# #) Getting: 1 Items: (# #) Getting: 0 Items: (# #) Getting: 1 Items: (# #) Getting: 0 Items: (# #) Getting: 1 Items: (# #) Getting: 0 Items: # Getting: 1