Skip to content

Commit

Permalink
Fix #172
Browse files Browse the repository at this point in the history
  • Loading branch information
1st1 committed Jul 4, 2018
1 parent 4a0c73e commit b5b4abb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion uvloop/includes/stdlib.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ cdef int ssl_SSL_ERROR_WANT_READ = ssl.SSL_ERROR_WANT_READ
cdef int ssl_SSL_ERROR_WANT_WRITE = ssl.SSL_ERROR_WANT_WRITE
cdef int ssl_SSL_ERROR_SYSCALL = ssl.SSL_ERROR_SYSCALL

cdef uint64_t MAIN_THREAD_ID = <uint64_t>threading.main_thread().ident
cdef uint64_t MAIN_THREAD_ID = <uint64_t><int64_t>threading.main_thread().ident

cdef int subprocess_PIPE = subprocess.PIPE
cdef int subprocess_STDOUT = subprocess.STDOUT
Expand Down
2 changes: 1 addition & 1 deletion uvloop/loop.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ cdef class Loop:
cdef inline _check_thread(self):
if self._thread_id == 0:
return
cdef uint64_t thread_id = PyThread_get_thread_ident()
cdef uint64_t thread_id = <uint64_t><int64_t>PyThread_get_thread_ident()
if thread_id != self._thread_id:
raise RuntimeError(
"Non-thread-safe operation invoked on an event loop other "
Expand Down

0 comments on commit b5b4abb

Please sign in to comment.