Closed sagebind closed 9 years ago
It wasn't that resources were being transferred, it was that fclose()
was being called in the thread on a resource owned by the parent.
I modified the socket component to not call fclose()
on destruct so the user can decide if the socket should be closed or not in the current context. Socket::close()
still calls fclose()
. Generally Socket::close()
needs to be explicitly called anyway because otherwise the loop will hold a reference to the Socket
object and __destruct()
will won't be called until script termination. This should be made clear in the socket documentation.
Noice. :facepunch:
Not sure if this is intended behavior in pthreads or not, but we should refactor channels to not require resources to be transferred across threads to avoid
zend_mm_heap corrupted
errors.