Jerry, or anyone else for that matter,...
I'm trying, mostly for the sake of learning, to write a simple multi-threaded
comm class. Most of it seems to work, so far, except the queues. I'd like
to have a write queue and read queue. That seems simple - there's a deque in
the STL. Except that it doesn't really want to work if I make it volatile.
If it is volatile, the compiler complains. If it isn't volatile, it becomes
really funny - I write to the serial port fine, but reading doesn't always
seem to work... if I don't give it a long enough delay, the "AT" coming back
from the modem (which I see in a line monitor) only is discovered if I give
it a long enough timeout. I'm sure volatile would help here - if I could
figure out what I was doing with it. :-)
Leaving it non-volatile and then removing the thread/queue for reading may
work. However, I'm suspicious that the write queue may not work in stress
situations (i.e., trying to send a file).
Any ideas?
... Press now to access the pirate software.
--- FastEcho 1.46
---------------
* Origin: House of Fire BBS - Toronto - (416)601-0085 - v.34 (1:250/536)
|