Skip to content

Conversation

@matthewdicks98
Copy link

Added a time out for the semaphore in the client using the same structure as found in the Hawkes client.

public void waitForMarketDataUpdate() { while(!mktDataUpdateSemaphore.acquire()){} }
public void waitForMarketDataUpdate() {
long startTime = System.currentTimeMillis();
while(!mktDataUpdateSemaphore.acquire()){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

acquire is a blocking operation. This should be tryAcquire with a timeout

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem. This was the implementation in the Hawkes client so does that need to be changed to use a tryAquire as well?

@dharmeshsing
Copy link
Owner

dharmeshsing commented May 16, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants