On Friday, 18 March 2016 at 17:24:27 UTC, Ali Çehreli wrote:
On 03/18/2016 03:50 AM, Dsby wrote:
foreach (i ; 0..4) {
auto th = new Thread(delegate(){listRun(i);});//this is
erro
_thread[i]= th;
th.start();
}
void listRun(int i)
{
writeln("i = ", i); // the value is not(
On 03/18/2016 09:14 AM, Dsby wrote:
On Friday, 18 March 2016 at 11:09:37 UTC, Atila Neves wrote:
On Friday, 18 March 2016 at 10:50:34 UTC, Dsby wrote:
foreach (i ; 0..4) {
auto th = new Thread(delegate(){listRun(i);});//this is erro
_thread[i]= th;
th.start();
}
void listRun(int i
On Friday, 18 March 2016 at 10:50:34 UTC, Dsby wrote:
foreach (i ; 0..4) {
auto th = new Thread(delegate(){listRun(i);});//this is erro
_thread[i]= th;
th.start();
}
void listRun(int i)
{
writeln("i = ", i); // the value is not(0,1,2,3), it all
is 2.
}
I want to
On Friday, 18 March 2016 at 10:50:34 UTC, Dsby wrote:
foreach (i ; 0..4) {
auto th = new Thread(delegate(){listRun(i);});//this is erro
_thread[i]= th;
th.start();
}
void listRun(int i)
{
writeln("i = ", i); // the value is not(0,1,2,3), it all
is 2.
}
I want to
On Friday, 18 March 2016 at 17:31:11 UTC, Ali Çehreli wrote:
On 03/18/2016 09:14 AM, Dsby wrote:
[...]
Here is one that puts 'shared' in a lot of places:
import std.stdio;
import std.concurrency;
[...]
thanks.
On Friday, 18 March 2016 at 11:09:37 UTC, Atila Neves wrote:
On Friday, 18 March 2016 at 10:50:34 UTC, Dsby wrote:
foreach (i ; 0..4) {
auto th = new Thread(delegate(){listRun(i);});//this is erro
_thread[i]= th;
th.start();
}
void listRun(int i)
{
writeln("i = ",
On 03/18/2016 03:50 AM, Dsby wrote:
foreach (i ; 0..4) {
auto th = new Thread(delegate(){listRun(i);});//this is erro
_thread[i]= th;
th.start();
}
void listRun(int i)
{
writeln("i = ", i); // the value is not(0,1,2,3), it all is 2.
}
I want to know how to use it like std
foreach (i ; 0..4) {
auto th = new Thread(delegate(){listRun(i);});//this is erro
_thread[i]= th;
th.start();
}
void listRun(int i)
{
writeln("i = ", i); // the value is not(0,1,2,3), it all is
2.
}
I want to know how to use it like std::bind.