Skip to content

pending tasks queue unused #137

@joprice

Description

@joprice

It looks like the pending tasks queue is unused, since it is always set to an empty list when it is empty, and then set back to empty afterwards. Was this intended to be written differently to queue up the actions and batch them?

let rec handler msg =
match !pending with
| None ->
let () = pending := ((Some ([]))[@explicit_arity ]) in
let newModel = pumperInterface.handleMsg (!model) msg in
let () = model := newModel in
(match !pending with
| None ->
failwith
"INVALID message queue state, should never be None during message processing!"
| ((Some ([]))[@explicit_arity ]) -> pending := None
| ((Some (msgs))[@explicit_arity ]) ->
let () = pending := None in List.iter handler (List.rev msgs))
| ((Some (msgs))[@explicit_arity ]) ->
pending := ((Some ((msg :: msgs)))[@explicit_arity ]) in

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions