On Wednesday, 22 July 2015 at 14:28:48 UTC, Chris wrote:
What would be the best way to manage different threads (spawned
via std.concurrency), e.g. to tell them to stop at once, once a
new command comes in? A thread pool? How would that look like
in D? I feel my knowledge of D threads is still
On Wednesday, 22 July 2015 at 15:51:23 UTC, Chris wrote:
On Wednesday, 22 July 2015 at 15:41:06 UTC, Alex Parrill wrote:
On Wednesday, 22 July 2015 at 14:28:48 UTC, Chris wrote:
What would be the best way to manage different threads
(spawned via std.concurrency), e.g. to tell them to stop at
On Wednesday, 22 July 2015 at 15:41:06 UTC, Alex Parrill wrote:
On Wednesday, 22 July 2015 at 14:28:48 UTC, Chris wrote:
What would be the best way to manage different threads
(spawned via std.concurrency), e.g. to tell them to stop at
once, once a new command comes in? A thread pool? How
On Wednesday, 22 July 2015 at 09:04:49 UTC, Marc Schütz wrote:
But as long as the original pointer is still on the stack, that
one _will_ keep the object alive. It is only a problem if all
pointers to a GC managed object are stored in places the GC
isn't informed about.
Sorry, I have
On Wednesday, 22 July 2015 at 16:16:36 UTC, John Colvin wrote:
On Wednesday, 22 July 2015 at 15:51:23 UTC, Chris wrote:
On Wednesday, 22 July 2015 at 15:41:06 UTC, Alex Parrill wrote:
[...]
Thanks. I'm dealing with nested threads at the moment.
main
{
spawn(thread1)
{
// Does some
On Wednesday, 22 July 2015 at 17:17:17 UTC, Frank Pagliughi wrote:
On Wednesday, 22 July 2015 at 09:04:49 UTC, Marc Schütz wrote:
But as long as the original pointer is still on the stack,
that one _will_ keep the object alive. It is only a problem if
all pointers to a GC managed object are
I have tried to build this and failed miserably. I have some
questions?
What make do you use? digital mars, gnu. what tools do you need?
is it possible? I also failed to build zlib32coff.lib
make[2]: *** No rule to make target `zlib32mscoff.lib'. Stop.
I could say more but it probably
On Wednesday, July 22, 2015 04:29:23 Taylor Gronka via Digitalmars-d-learn
wrote:
I have a template function, and I want it to do something if the
input variable is a list of structs, and something else if the
input is a struct.
If you want a template to be different for different types, then
On Tuesday, 21 July 2015 at 21:50:35 UTC, rsw0x wrote:
On Tuesday, 21 July 2015 at 21:44:07 UTC, rsw0x wrote:
On Sunday, 19 July 2015 at 17:12:07 UTC, rsw0x wrote:
[...]
wow, I don't even remember posting this.
This is (mostly) wrong, but I'm unsure if a pointer to another
pointer on the
On Wednesday, July 22, 2015 02:19:52 antropod via Digitalmars-d-learn wrote:
I want my coverage analysis to be 100%, how do I skip lines like
assert(0);
from being counted?
AFAIK, there is no way to so, and I've mentioned that problem to Walter
before, so I would have expected him to mention
On Wednesday, 22 July 2015 at 09:32:15 UTC, John Colvin wrote:
On Wednesday, 22 July 2015 at 09:23:36 UTC, Clayton wrote:
[...]
The normal way of doing this would be using
std.datetime.StopWatch:
StopWatch sw;
sw.start();
algorithm();
long exec_ms = sw.peek().msecs;
Much
How does one represent Duration in only Micro-seconds, or
milliseconds. Trying to measure the execution time of an
algorithm and I get 4 ms, 619 μs, and 8 hnsecs , I want to sum
all these and get total hnsecs or μs .
I would also appreciate advise on whether this is the best way
to measure
On Wednesday, 22 July 2015 at 09:23:36 UTC, Clayton wrote:
How does one represent Duration in only Micro-seconds, or
milliseconds. Trying to measure the execution time of an
algorithm and I get 4 ms, 619 μs, and 8 hnsecs , I want to
sum all these and get total hnsecs or μs .
I would also
It seems that PATCH http method is missing from std.net.curl http
methods.
No way to use it?
On Wednesday, 22 July 2015 at 23:39:46 UTC, Jonathan M Davis
wrote:
On Wednesday, July 22, 2015 20:27:35 Taylor Hillegeist via
Digitalmars-d-learn wrote:
I have tried to build this and failed miserably. I have some
questions?
What make do you use? digital mars, gnu. what tools do you
need?
is
On Thursday, 23 July 2015 at 01:39:05 UTC, Mike Parker wrote:
post at [1] where Rainer shared the relevant bits of a batch
Gah, hate it when I forget the links.
[1] http://forum.dlang.org/post/m456t5$2jc4$1...@digitalmars.com
On Tuesday, 21 July 2015 at 05:53:26 UTC, yawniek wrote:
i tried to automagically create bindings for librdkafka
(https://github.com/edenhill/librdkafka)
with dstep.
now the code contains typedefs structs with the same name as
methods:
```
typedef struct rd_kafka_metadata {
int
On Wednesday, 22 July 2015 at 20:27:37 UTC, Taylor Hillegeist
wrote:
I have tried to build this and failed miserably. I have some
questions?
What make do you use? digital mars, gnu. what tools do you
need? is it possible? I also failed to build zlib32coff.lib
make[2]: *** No rule to make
On Wednesday, July 22, 2015 23:19:35 nurfz via Digitalmars-d-learn wrote:
Hmm, is there a specific reason aside from the encapsulation
violation? It seems needlessly complicated. If you have
someone/something that has direct access to your source code,
isn't a getter/setter the least of your
I have some code.
//client.d
import std.stdio;
import std.socket;
import std.conv;
void main() {
Socket client = new TcpSocket(AddressFamily.INET);
autoaddr = new InternetAddress(localhost, 2021);
autoaddrServer = new InternetAddress(localhost,
2017);
How could I get this D code to work similar to this Python code?
So, here is the D code:
import std.stdio;
class Vehicle {
int speed;
void printSpeed() {
writeln(this.speed);
}
}
class Airplane: Vehicle {
int speed = 100;
}
Hmm, is there a specific reason aside from the encapsulation
violation? It seems needlessly complicated. If you have
someone/something that has direct access to your source code,
isn't a getter/setter the least of your concerns? Does the
@property decorator incur a large runtime cost?
On Wednesday, 22 July 2015 at 22:22:02 UTC, nurfz wrote:
How could I get this D code to work similar to this Python code?
So, here is the D code:
import std.stdio;
class Vehicle {
int speed;
void printSpeed() {
writeln(this.speed);
}
}
On Wednesday, July 22, 2015 22:22:00 nurfz via Digitalmars-d-learn wrote:
How could I get this D code to work similar to this Python code?
So, here is the D code:
import std.stdio;
class Vehicle {
int speed;
void printSpeed() {
On Wednesday, July 22, 2015 20:27:35 Taylor Hillegeist via Digitalmars-d-learn
wrote:
I have tried to build this and failed miserably. I have some
questions?
What make do you use? digital mars, gnu. what tools do you need?
is it possible? I also failed to build zlib32coff.lib
make[2]: ***
On Wednesday, 22 July 2015 at 09:04:49 UTC, Marc Schütz wrote:
On Tuesday, 21 July 2015 at 21:50:35 UTC, rsw0x wrote:
On Tuesday, 21 July 2015 at 21:44:07 UTC, rsw0x wrote:
[...]
addendum:
http://dlang.org/garbage.html
[...]
[...]
I believe this implies that it would *not* keep the
What would be the best way to manage different threads (spawned
via std.concurrency), e.g. to tell them to stop at once, once a
new command comes in? A thread pool? How would that look like in
D? I feel my knowledge of D threads is still a bit limited.
27 matches
Mail list logo