3 ms·
>"Concurrently" means "at the same time", both in English and in CS. One way to make it appear as if you have concurrency is to timeslice. For one, the CS lite
by coldtea 9y ago
>"Concurrently" means "at the same time", both in English and in CS. One way to make it appear as if you have concurrency is to timeslice.
For one, the CS literature defines concurrency as not necessarily being at the same time.
Second, timeslice, by definition, is not at the same time. Hence the need to use quotes there. Concurrently does not mean "at the same time" any more than "timeslice" implies.
>But it's not at all valid to claim, as @coldtea seems to be doing, that concurrency excludes the notion of two things happening at the same time.
I never claimed that. I wrote that concurrency is not parallelism (which it isn't), not that it excludes parallelism.
Basic timeslicing (baring any other mechanism) for example is concurrent but not parallel. Node's evented "cooperative" concurrency is also not parallel.
- pizlonator 9y agoTimeslicing makes it impossible for a program to accidentally discover that its threads or processes are not really running at the same time. For example, an infinite loop in one thread will not halt all other threads. To me, that’s concurrency. Event loops are not like that. They run tasks to completion before starting other tasks and indeed the whole point of how you leverage an event loop is to take advantage of the fact that other things don’t happen at the same time. I would prefer to say other things don’t happen concurrently, and you would have understood my meaning. It’s not correct to have used the word “parallel” in that context since my example only needs one CPU. I think it’s ok to think of event loop interleaving bugs as being concurrency bugs, but insisting that event loops are proper instance of concurrency is diluting the terminology too much IMO. Hence I much refer to use concurrency to mean the case where the interleaving granule is not under the programmer’s control.