forked from soravux/scoop
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MULTIPLE CHANGES Fixed Inefficient Scheduling (Issue soravux#68)
Made the following changes 1. Added a new function append_init which is used by futures.submit. This function adds newly spawned futures to the broker's task queue. 2. Added new state variable request_in_process to the FutureQueue object in order to track the state of the future request. This is used to track the state of a future request so that a future request is sent iff the previous future request has been answered 3. Also, replaced function recvFutures with recvIncoming which passes the received incoming messages back to updateQueue where they are processed. Changed _recv to only perform preprocessing of the messages.
- Loading branch information
Showing
5 changed files
with
149 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Worker requests | ||
INIT = b"I" | ||
REQUEST = b"RQ" | ||
TASK = b"T" | ||
REPLY = b"RP" | ||
SHUTDOWN = b"S" | ||
VARIABLE = b"V" | ||
BROKER_INFO = b"B" | ||
STATUS_READY = b"SD" | ||
RESEND_FUTURE = b"RF" | ||
HEARTBEAT = b"HB" | ||
REQUEST_STATUS_REQUEST = b"RSR" | ||
REQUEST_STATUS_ANS = b"RSA" | ||
REQUEST_INPROCESS = b"RI" | ||
REQUEST_UNKNOWN = b"RU" | ||
|
||
# Task statuses | ||
STATUS_HERE = b"H" | ||
STATUS_GIVEN = b"G" | ||
STATUS_NONE = b"N" | ||
|
||
# Broker interconnection | ||
CONNECT = b"C" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.