[Quickfix-developers] Make operation synchronize
Brought to you by:
orenmnero
From: alon a. <alo...@gm...> - 2010-11-27 21:54:25
|
Hi, Using Quick Fix engine I trying to synchronize some engine messages. I have a flow that operate a number of action on the account (send a number of message to the server). I want to synchronize between those messages, so they will start sequential. For example, I want to ask for 'CollateralInquiry' (BB) and wait for response. When the 'CollateralInquiryAck' (BG) receive, I will move to the next operation, send a 'NewOrderSingle' (D) for instance. The catch is that I don't want to write a spaghetti code (with callback like 'onMessage' on each operation). The ideal is to wait for operation to finish and then start the second one. Using c#, I tried to sync some operation with 'WaitHandle.WaitOne()' unsuccessfully. Any ideas? Thanks, Alon. |