Skip to content

Log when Compile and ErrorCheck resources are requested but not available #66

@patritzenfeld

Description

@patritzenfeld

Maybe we could just log when one of the semaphores is exhausted, but there's another request waiting, e.g. something like this in place of the plain MSem.with sem action calls that are currently used:

waitAndLogExhausted name sem action = do
  open <- MSem.peekAvail sem
  when (open < 1) $
    hPutStrLn stderr $ name ++ " has exhausted its available resources, but there is further demand." 
  MSem.with sem action

with waitAndLogExhausted "Compiles" (compileSem ctx) someIO

Then we can see how often requests have to queue up because of the current limit and can try increasing the values.

Originally posted by @patritzenfeld in #65 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions