diff options
| author | moteus <mimir@newmail.ru> | 2013-12-31 10:09:32 +0400 |
|---|---|---|
| committer | moteus <mimir@newmail.ru> | 2013-12-31 10:09:32 +0400 |
| commit | 24a0d330a1d7c34269ce987999e221e99171b35c (patch) | |
| tree | 0c0f41cd2e3c001c923b112f205a4c9c17cc69c2 | |
| parent | 3bae474eb5e23c44c77ea414b26aea58d00bdc49 (diff) | |
| download | lua-llthreads2-24a0d330a1d7c34269ce987999e221e99171b35c.tar.gz lua-llthreads2-24a0d330a1d7c34269ce987999e221e99171b35c.tar.bz2 lua-llthreads2-24a0d330a1d7c34269ce987999e221e99171b35c.zip | |
Fix. typo
| -rw-r--r-- | src/llthread.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/llthread.c b/src/llthread.c index 354cdee..0c4a107 100644 --- a/src/llthread.c +++ b/src/llthread.c | |||
| @@ -294,16 +294,16 @@ static void llthread_destroy(llthread_t *this) { | |||
| 294 | break; | 294 | break; |
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | /* ATACHED */ | 297 | /* ATTACHED */ |
| 298 | if(!IS(this, JOINED)){ | 298 | if(!IS(this, JOINED)){ |
| 299 | llthread_join(this, INFINITE_JOIN_TIMEOUT); | 299 | llthread_join(this, INFINITE_JOIN_TIMEOUT); |
| 300 | if(!IS(this, JOINED)){ | 300 | if(!IS(this, JOINED)){ |
| 301 | /* @todo use current lua state to logging */ | 301 | /* @todo use current lua state to logging */ |
| 302 | /* | 302 | /* |
| 303 | * char buf[ERROR_LEN]; | 303 | * char buf[ERROR_LEN]; |
| 304 | * strerror_r(errno, buf, ERROR_LEN); | 304 | * strerror_r(errno, buf, ERROR_LEN); |
| 305 | * llthread_log(L, "Error can not join thread on gc: ", buf); | 305 | * llthread_log(L, "Error can not join thread on gc: ", buf); |
| 306 | */ | 306 | */ |
| 307 | } | 307 | } |
| 308 | } | 308 | } |
| 309 | if(IS(this, JOINABLE)){ | 309 | if(IS(this, JOINABLE)){ |
| @@ -329,11 +329,12 @@ static int llthread_detach(llthread_t *this){ | |||
| 329 | assert(IS(this, STARTED)); | 329 | assert(IS(this, STARTED)); |
| 330 | assert(this->child != NULL); | 330 | assert(this->child != NULL); |
| 331 | 331 | ||
| 332 | this->child = NULL; | ||
| 333 | |||
| 332 | /*we can not detach joined thread*/ | 334 | /*we can not detach joined thread*/ |
| 333 | if(IS(this, JOINED)) | 335 | if(IS(this, JOINED)) |
| 334 | return 0; | 336 | return 0; |
| 335 | 337 | ||
| 336 | this->child = NULL; | ||
| 337 | #ifdef USE_PTHREAD | 338 | #ifdef USE_PTHREAD |
| 338 | rc = pthread_detach(this->thread); | 339 | rc = pthread_detach(this->thread); |
| 339 | #else | 340 | #else |
