Steven Schveighoffer wrote:
What I'd propose is either:
1) Create your own lock-free associative array (yup, reinvent the
wheel to introduce AA to the world of 'shared')
2) In this small case it may seem best (though mind that often such
cases do grow up to the point when you still need to ret
On Thu, 07 Oct 2010 16:18:26 -0400, Stanislav Blinov
wrote:
Bob Cowdery wrote:
Could you please post the use case as well? It should matter not from
what module you make the calls, as long as those calls are from the
same thread. Different threads get different copies of the registry.
I s
Bob Cowdery wrote:
Could you please post the use case as well? It should matter not from
what module you make the calls, as long as those calls are from the
same thread. Different threads get different copies of the registry.
I suspected that might be the case. Yes they are from separate threa
On 07/10/2010 20:33, Stanislav Blinov wrote:
> Bob Cowdery wrote:
>> Can someone sort out what I'm doing wrong here please.
>> -
>> import std.concurrency, std.stdio;
>> import Definitions.procNames;
>>
>> class CRegistry {
>> static Tid[E_PROC] TidRegistry;
>>
>> static void
Bob Cowdery wrote:
Can someone sort out what I'm doing wrong here please.
-
import std.concurrency, std.stdio;
import Definitions.procNames;
class CRegistry {
static Tid[E_PROC] TidRegistry;
static void register(E_PROC name, Tid tid) {
writeln(TidRegistry);
Can someone sort out what I'm doing wrong here please.
-
import std.concurrency, std.stdio;
import Definitions.procNames;
class CRegistry {
static Tid[E_PROC] TidRegistry;
static void register(E_PROC name, Tid tid) {
writeln(TidRegistry);
TidRegistry[name] =
On Thu, 07 Oct 2010 07:50:49 -0400, Vasileios Anagnostopoulos
wrote:
What is the purpose of object.di? where can I learn more?
http://www.digitalmars.com/d/2.0/dmd-linux.html#interface_files
I believe the purpose for object.di is to hide the runtime implementation
from the importer.
On 07.10.2010 19:09, Steven Schveighoffer wrote:
> On Thu, 07 Oct 2010 12:44:48 -0400, Johannes Pfau wrote:
>> Is this really the expected behavior for linearRemove?
>
> Yes, an SList range is terminated by a null pointer, so there is no
> limit to how far it will iterate.
>
> Try to construct a
What is the purpose of object.di? where can I learn more?
On Thu, 07 Oct 2010 12:44:48 -0400, Johannes Pfau wrote:
Hi,
I'm currently trying to replace the array in my signal implementation
with the SList from std.container. I need to remove elements from the
list, but I can't seem to get it right.
According to the documentation, I expect linearRemove
Hi,
I'm currently trying to replace the array in my signal implementation
with the SList from std.container. I need to remove elements from the
list, but I can't seem to get it right.
According to the documentation, I expect linearRemove to remove the
contents of the passed range, but linearRemove
On Thu, 07 Oct 2010 14:43:25 +, Benjamin Thaut wrote:
> If I want to tell the compiler that a certain function argument should
> not be copied (say a large struct, or a array) which is the right way to
> do?
>
> arrays:
> 1. function foo(in float[] bar) { ... } 2. function foo(ref
> const(flo
Benjamin Thaut wrote:
If I want to tell the compiler that a certain function argument should
not be
copied (say a large struct, or a array) which is the right way to do?
arrays:
1. function foo(in float[] bar) { ... }
2. function foo(ref const(float[]) bar) { ... }
3. something else
For ar
On Thu, 07 Oct 2010 10:43:25 -0400, Benjamin Thaut
wrote:
If I want to tell the compiler that a certain function argument should
not be
copied (say a large struct, or a array) which is the right way to do?
arrays:
1. function foo(in float[] bar) { ... }
2. function foo(ref const(float[]) b
If I want to tell the compiler that a certain function argument should not be
copied (say a large struct, or a array) which is the right way to do?
arrays:
1. function foo(in float[] bar) { ... }
2. function foo(ref const(float[]) bar) { ... }
3. something else
structs:
1. function foo(in largest
bearophile wrote:
In D classes start with an upper case, and methods with a lower case
(and both generally use camelCase/CamelCase instead of underscores).
So the way to write that code is:
abstract class Foo {
protected:
void wrongType() {
Yes, if one is to slavishly follow the rule
Benjamin Thaut:
> abstract class foo {
> protected:
> void WrongType(){
> assert(0,"Using wrong type");
> }
In D classes start with an upper case, and methods with a lower case (and both
generally use camelCase/CamelCase instead of underscores).
So the way to write tha
Thanks, that fixes it
Kind Regards
Benjamin Thaut
On Thu, 07 Oct 2010 10:43:12 +0400, Benjamin Thaut
wrote:
For the following code in D 2.0 using dmd 2.049:
import std.stdio;
abstract class foo {
protected:
void WrongType(){
assert(0,"Using wrong type");
}
public:
void Update(int value){WrongType();}
On Thu, 07 Oct 2010 01:36:23 +0400, Dr. Smith wrote:
Thank you. Indeed, I forgot: auto f = File("outfile.txt", "w");
Interestingly, this apparently works within a for-loop to overwrite the
file on
the first iteration and appending otherwise (Should there not be an
explicit
append arg?):
20 matches
Mail list logo