Re: What would you do...

2011-12-10 Thread Manu
On 9 December 2011 01:53, Sean Kelly wrote: > On Dec 8, 2011, at 8:23 AM, Manu wrote: > > > > Just digging through concurrence.d since the docs are pretty bare, and > I've come across this pattern, which raises a pretty worrying alarm to me. > I wonder if this is common in D libraries... > > > >

Re: What would you do... -> Extending std.concurrency

2011-12-08 Thread Andrew Wiley
On Thu, Dec 8, 2011 at 7:12 PM, Sean Kelly wrote: > On Dec 8, 2011, at 4:13 PM, Andrew Wiley wrote: >> >> This is somewhat of a threadjack, but I was looking at making a >> lighter actor-like abstraction for message passing, and possibly >> making it compatible with std.concurrency, and I saw this

Re: What would you do...

2011-12-08 Thread Sean Kelly
On Dec 8, 2011, at 4:13 PM, Andrew Wiley wrote: > > This is somewhat of a threadjack, but I was looking at making a > lighter actor-like abstraction for message passing, and possibly > making it compatible with std.concurrency, and I saw this: > "The general idea is that every messageable entity i

Re: What would you do...

2011-12-08 Thread Andrew Wiley
On Thu, Dec 8, 2011 at 5:53 PM, Sean Kelly wrote: > On Dec 8, 2011, at 8:23 AM, Manu wrote: >> >> Just digging through concurrence.d since the docs are pretty bare, and I've >> come across this pattern, which raises a pretty worrying alarm to me. I >> wonder if this is common in D libraries... >

Re: What would you do...

2011-12-08 Thread Timon Gehr
On 12/09/2011 12:21 AM, Manu wrote: No overload, receives a tuple, and assumes that static-if the first tuple item is IMPLICITLY CONVERTIBLE to a Duration, I must be calling the 'overload'... I guess this means I can never pass a Duration in a message to t

Re: What would you do...

2011-12-08 Thread Sean Kelly
On Dec 8, 2011, at 8:23 AM, Manu wrote: > > Just digging through concurrence.d since the docs are pretty bare, and I've > come across this pattern, which raises a pretty worrying alarm to me. I > wonder if this is common in D libraries... > > ... > > No overload, receives a tuple, and assumes

Re: What would you do...

2011-12-08 Thread Sean Kelly
On Dec 8, 2011, at 7:51 AM, Manu wrote: > > The std.concurrency documentation is pretty bad. > So is std.concurrency.spawn() just effectively a helper for spawning a thread > that has mailbox support? Yes. Plus some restrictions on arguments to the new thread to help prevent data races. > std

Re: What would you do...

2011-12-08 Thread Sean Kelly
On Dec 8, 2011, at 6:00 AM, Manu wrote: > > Quite seriously. I'm trying to work out how D's threading/thread safety > architecture can help me here.. Also since there's no collections, I'm using > the associative arrays. How do I manage thread safety when accessing those? > Is there a generic l

Re: What would you do...

2011-12-08 Thread Manu
> > No overload, receives a tuple, and assumes that static-if the first >> tuple item is IMPLICITLY CONVERTIBLE to a Duration, I must be calling >> the 'overload'... >> >> I guess this means I can never pass a Duration in a message to the >> non-timeout receive()... or anything that is implicitly c

Re: What would you do...

2011-12-08 Thread Timon Gehr
; I'm writing C code, manually managing thread safety, timeout logic. I feel > > like D offers some fundamental features that should make solving this > > problem a whole lot simpler that I must be completely missing... > &g

Re: What would you do...

2011-12-08 Thread Manu
s >> > > entered the group... >> > > "The D way" to solve these questions is a mystery to me. I just feel >> like >> > > I'm writing C code, manually managing thread safety, timeout logic. I >> feel >> > > like D offers some f

Re: What would you do...

2011-12-08 Thread Andrei Alexandrescu
On 12/8/11 9:51 AM, Manu wrote: The std.concurrency documentation is pretty bad. I think we should add a link to the TDPL chapter to the std.concurrency documentation page. Andrei

Re: What would you do...

2011-12-08 Thread Manu
gt; each > > > group), and how to interrupt a blocking select() when a new connection > has > > > entered the group... > > > "The D way" to solve these questions is a mystery to me. I just feel > like > > > I'm writing C code, manually managing

Re: What would you do...

2011-12-08 Thread Jens Mueller
> > I'm writing C code, manually managing thread safety, timeout logic. I feel > > like D offers some fundamental features that should make solving this > > problem a whole lot simpler that I must be completely missing... > > > > So, in a few sentences... simp

Re: What would you do...

2011-12-08 Thread Manu
t should make solving this > problem a whole lot simpler that I must be completely missing... > > So, in a few sentences... simple problem, what would you do? > Nobody at all? :( Quite seriously. I'm trying to work out how D's threading/thread safety architecture can help me here

What would you do...

2011-12-07 Thread Manu
t feel like I'm writing C code, manually managing thread safety, timeout logic. I feel like D offers some fundamental features that should make solving this problem a whole lot simpler that I must be completely missing... So, in a few sentences... simple problem, what would you do?