Skip to content

Race condition #4

@Johnlon

Description

@Johnlon

If Dice.playdice() drops into the follow branch before the takeLeadership callback occurs then the program hangs without generating any dice rolls.

This is because the first block of code in follow() has a loop condition that never breaks out.
ie "while (ledgers == null) "

A potential solution is to change the condition to so that one the leadership
"while (ledgers == null && !leader)"

Or is this additional check wrong for some reason?

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