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@hunch.net>2009-10-01 01:55:38 +0400
committerJohn Langford <jl@hunch.net>2009-10-01 01:55:38 +0400
commit48b25093d0e6bf3096714dc29981ed0d104fbdb3 (patch)
treef7b2f7b4403c7ccd8f91d9ff23d63d08dee67441 /sender.cc
parent8fce3bccd890733f4150230a70c90d035396b652 (diff)
Multiple destination sendto working.
Diffstat (limited to 'sender.cc')
-rw-r--r--sender.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/sender.cc b/sender.cc
index 5c4b4f88..f9cce040 100644
--- a/sender.cc
+++ b/sender.cc
@@ -59,11 +59,11 @@ size_t find_split(size_t number)
void open_sockets(vector<string>& hosts)
{
+ size_t new_id = global.unique_id;
for (size_t i = 0; i < d_1; i++)
{
v_array<io_buf> t;
push(bufs,t);
- size_t new_id = global.unique_id;
for (size_t j = 0; j< d_2; j++)
{
size_t number = j + d_2*i;
@@ -125,21 +125,16 @@ void* send_thread(void*)
simple_label.cache_label(ld,bufs[i][j]);//send label information.
send_features(i,j,bufs[i][j],ec);
}
- delay_example(ec);
- example* t = get_delay_example(0);
- finish_example(t);
+ delay_example(ec,0);
}
- else if (thread_done(0))
- {
- //close our outputs to signal finishing.
+ else
+ { //close our outputs to signal finishing.
for (size_t i = 0; i < d_1; i++)
for (size_t j = 0; j < d_2; j++)
shutdown(bufs[i][j].files[0],SHUT_WR);
return NULL;
}
- else
- ;//busywait when we have sent out all examples but not yet received predictions for all.
}
return NULL;