Re: [Beepcore-java-users] startChannel & threads
Status: Beta
Brought to you by:
huston
From: Huston <hu...@us...> - 2002-05-17 17:15:43
|
> I'm writing a simple little client/server thing in BEEP using two > profiles and I've run into a runtime issue with beepcore that I think > should be addressed. Perhaps I'm not understanding how to use the > startChannel method.. > Basically, I end up firing up two threads and calling > startChannel on the session object (passed in to each thread). This > appears to yield a race condition where each thread ends up causing a > <MSG> to be sent on channel zero without a RPY being received and some > sort of deadlock, with apparently the second channel creation request > failing. > In short, startChannel doesn't seem to be threadsafe and I think > it absolutely should - not sure if this is a bug or an intentional design > choice. Enter this as a bug. If you could please provide some more details about the failure that would help. Session and Channel are both intended to be thread-safe so this is probably a bug. The library will send both MSGs before receiving the RPY for the first MSG but the listener is required to process them in order so this is valid within the spec. --Huston |