Metered concurrency: Difference between revisions

Content deleted Content added
+D
m →‎{{header|D}}: fixed module name
Line 97: Line 97:


=={{header|D}}==
=={{header|D}}==
<d>module socket ;
<d>module meteredconcurrency ;
import std.stdio ;
import std.stdio ;
import std.thread ;
import std.thread ;
Line 146: Line 146:
c.wait ;
c.wait ;
}</d>
}</d>

=={{header|E}}==
=={{header|E}}==
This semaphore slightly differs from the task description; the release operation is not on the semaphore itself but given out with each acquisition, and cannot be invoked too many times.
This semaphore slightly differs from the task description; the release operation is not on the semaphore itself but given out with each acquisition, and cannot be invoked too many times.