I assume that in the COBOL case by "shared message queue" you mean "many-to-many" message queue.
I have written COBOL programs in the very distant past, but they were not concurrent programs, so I do not know how COBOL queues behave, so you are probably right.
But the input queues of actors must also be shared, i.e. they must be "many-to-one" message queues, because there are many other actors which can send messages to an actor.
There are 3 kinds of shared message queues: many-to-one, one-to-many and many-to-many. Whenever the message queues may be used by multiple threads, which is always on modern CPUs, the 3 kinds of shared message queues must use certain methods to allow concurrent accesses, which are different for the 3 kinds of queues.
Obviously, many-to-many queues have the most complex implementation, while many-to-one queues are simpler, but they must still use atomic instructions in the right way, to avoid data corruption. Only the one-to-one message queues do not need atomic instructions, but only store-release and load-acquire instructions.
By shared queue I mean that the queue doesn't belong to any single task or actor.
Each actor owns its own queue, and is the only reader. This makes it a many-to-one queue.
> Whenever the message queues may be used by multiple threads, which is always on modern CPUs, the 3 kinds of shared message queues must use certain methods to allow concurrent accesses, which are different for the 3 kinds of queues.
This is exactly what actor systems like Erlang avoid. The Erlang VM handles preemptive multitasking for the actors it manages, without using OS threads. This eliminates a lot of concurrency issues, and is a big part of why Erlang systems have such a reputation for reliability.
You can think of it like a green thread system where each thread has its own private message queue.
> but they must still use atomic instructions in the right way, to avoid data corruption.
This is only an issue because the message queues you're talking about are implemented separately from the OS, so there are no guarantees about concurrency behavior. This is exactly what the actor model solves for.