diff options
author | John Langford <jl@jl-desktop.(none)> | 2010-09-05 03:35:32 +0400 |
---|---|---|
committer | John Langford <jl@jl-desktop.(none)> | 2010-09-05 03:35:32 +0400 |
commit | e175cea192df51700151c8b80801b6452aa6581c (patch) | |
tree | 5dfe0a0043446a8334552b82e732625f25fe06ac /parser.cc | |
parent | f7388c09c82c6d0440679fab915d2fbcaa25d795 (diff) |
debugged some
Diffstat (limited to 'parser.cc')
-rw-r--r-- | parser.cc | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -604,7 +604,8 @@ example* get_example(size_t thread_num) return examples + ring_index; } else { - if (!done || examples_to_finish()) { + //if (!done || examples_to_finish()) { + if (!done) { pthread_cond_wait(&example_available, &examples_lock); pthread_mutex_unlock(&examples_lock); } @@ -638,6 +639,7 @@ void start_parser(size_t num_threads, parser* pf) { pthread_mutex_init(&examples[i].lock,NULL); examples[i].ld = calloc(1,pf->lp->label_size); + examples[i].in_use = false; } pthread_create(&parse_thread, NULL, main_parse_loop, pf); } |