Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Langford <jl@jl-desktop.(none)>2010-09-05 03:35:32 +0400
committerJohn Langford <jl@jl-desktop.(none)>2010-09-05 03:35:32 +0400
commite175cea192df51700151c8b80801b6452aa6581c (patch)
tree5dfe0a0043446a8334552b82e732625f25fe06ac /parser.cc
parentf7388c09c82c6d0440679fab915d2fbcaa25d795 (diff)
debugged some
Diffstat (limited to 'parser.cc')
-rw-r--r--parser.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/parser.cc b/parser.cc
index ad9cf1eb..536f5ee9 100644
--- a/parser.cc
+++ b/parser.cc
@@ -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);
}