Commit ff02c6aa authored by Sam Rushing's avatar Sam Rushing

modernize pyrex -> cython

parent 65f5c301
......@@ -25,6 +25,8 @@ __sync_version__ = "$Id: //prod/main/ap/shrapnel/coro/sync.pyx#29 $"
# Note: this file is included by <coro.pyx>
from cpython.list cimport PyList_New
# ================================================================================
# synchronization primitives
# ================================================================================
......@@ -753,11 +755,12 @@ cdef class fifo:
empty.
"""
cdef int i
cdef list result
while self.fifo.size == 0:
self.cv.wait()
result = [None] * self.fifo.size
i = 0
while self.fifo.size:
PySequence_SetItem (result, i, self.fifo._pop())
result[i] = self.fifo._pop()
i = i + 1
return result
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment