The documentation explicit states that the token pool is FIFO: "The pool is administered on a first-in-first-out basis. This is significant only if tokens of...
... The documentation only refers to the queue, not to the consumers. In other words: the consumers will always get the tokens in FIFO order, meaning the first...
... There are different ways to implement a server (or a client, for that matter). Dyalog's webserver uses one []DQ per thread per connection. In other words:...
... does. Does ... just ... Both really. The problem in mind is the semaphore example in the documentation. I don't understand how that pattern is useful if it...
... that ... connection. In ... alive by the ... dies. I ... don't ... (each ... thread ... connection, the ... thread) and ... thread which ... the ... ...
... Yes, I believe that must be the reason: since it needs to collect the bits of the messages manually it must make sure that they come in in the right order....
At 04:01 AM 1/2/2007, Stefano Lanzavecchia wrote ... It took me a while to understand the idea here -- the tokens are passed out in FIFO order, but the...
A little more testing shows that the consumer threads are not served exactly LIFO either. For example, I'll get thread id sequences, indicating what thread...
... Careful though: we are talking about consumers all waiting for the same token. In other words, consumers waiting for different tokens, will get them even...
At 04:01 AM 1/3/2007, Stefano Lanzavecchia wrote ... I was really referring to the issue that the interpreter must ensure that a thread that's doing something...
I have just acquired v11 of Dyalog/W and attempted to load some old V6 workspaces. Unfortunately they cause the version 11 to terminate. The resultant aplcore...
Giles, If you are willing to trust us with your workspaces, we would be happy to take a look at them and fix the bug which is preventing you from loading them....
... Exactly. As far as I know (and as far as I can tell), the thread scheduling is independent of the length of the queue. In other words, if the queue is full...
... callback for ... just examined the ... while ago.) From my own experience (I wrote at least one commercial TCP server using threads and Dyalog's TCP ...
Stefano, James, Your respective comments have been enlightening. Thanks. If indeed, as it appears it is, that the data structure of threads waiting on tokens...
... wrote: <snip> ... Alex, I agree with you here. I use a single, global []DQ, with & on the TCPReceive event callback. It is very simple, it appears to work,...
At 11:26 PM 1/3/2007, Paul S. Mansour wrote (in part) ... What effect are you trying to get? Are you trying to ensure that only one thread at a time is inside...
... I am afraid that keeping it on one line is not enough: I have empirical proof that the & is enough to cause a thread switch. ... Alas, you cannot a spawn a...
... That's also a question I wanted to ask at this point. The semaphore I know of, is a bit like a critical section, but where not just one but more than one...
... I wouldn't define it a set. I would define it a set of multiple queues. Tokens of the same kind are queued with respect to each other, tokens of different...
... queues. I agree completely, as you are talking about the tokens in the pool. But I'm talking about the set of processes doing a []TGET. This is apparently...
... semaphore I know ... more than ... with more ... the ... have to wait ... idea is ... indefinitely the ... there are 7 ... other 2 ... get in. If, ... a...
... Cool. I didn't know that. No, you are right, then: the implementation of a strong semaphore appears to be completely non-trivial... I have implemented in...
... only one thread at a time is inside a particular block of code? (The Windows world thinks that's handled by a "critical section".) Yes, (among a variety of...
One of the nice things about v11 is that upon a WS compaction, it returns unused memory to the operating system. I know that a compaction occurrs when you do a...
... One possibly erroneous speculation is that, if the OS is smart, it will be monitoring which memory pages are active and which not, so that it can swap out...
At 09:57 AM 1/10/2007, Paul S. Mansour wrote (in part) ... Would it solve things if the application were to include a call to []WA in the routine that closes...
I think the strategy might make sense. A minor technical point which you may already be aware of: Unused memory is only returned to the operating system on an...
... of ... []WA in the routine that closes the file? That would certainly solve for the specific scenario, but I'm looking for a more general solution. For...
Morten Kromberg Wrote: [...] We are considering introducing a mechanism which would give finer control, you may not always want all of the above when you call...