Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • cameo cameo
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 43
    • Issues 43
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CameoCameo
  • cameocameo
  • Issues
  • #1
Closed
Open
Issue created Apr 05, 2017 by yannick legoc@legocOwner

Blocking calls: cancel

The C++ and Java API provide blocking calls:

  • Publisher.waitForSubscribers
  • Subscriber.receive
  • Requester.request
  • Responder.receive
  • Instance.waitFor

The current implementation of cancel - e.g. called from a stop handler does not work well. It supposes the objects are waiting in a previous call. An improvement must be done:

  • Each object has the state waiting: true/false
  • Each object has the state canceled: true/false

The canceled state is terminal: once an object is canceled it cannot revert to uncanceled.

These states must be managed properly by the associated waiting object.

  • A common mutex blocks the access of the two states
  • waiting false then canceled true: does not send the cancel "signal"
  • waiting true then canceled true: sends the cancel "signal"
  • canceled true then waiting true: does not send the cancel "signal" but the call returns immediately

We can add the create calls for the different objects except Instance. How to manage?

Edited Feb 17, 2020 by yannick legoc
Assignee
Assign to
Time tracking