Guest User

Untitled

a guest
May 24th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. Index: thread_pthread.c
  2. ===================================================================
  3. --- thread_pthread.c (revision 745)
  4. +++ thread_pthread.c (working copy)
  5. @@ -169,6 +169,7 @@
  6. {
  7. #if WITH_OBJC
  8. rb_objc_gc_register_thread();
  9. + rb_objc_release((void *)th_ptr);
  10. #endif
  11. #if USE_THREAD_CACHE
  12. thread_start:
  13. @@ -327,6 +328,7 @@
  14. CHECK_ERR(pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED));
  15. CHECK_ERR(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED));
  16.  
  17. + rb_objc_retain((void *)th);
  18. err = pthread_create(&th->thread_id, &attr, thread_start_func_1, th);
  19. thread_debug("create: %p (%d)", th, err);
  20. CHECK_ERR(pthread_attr_destroy(&attr));
Add Comment
Please, Sign In to add comment