Skip to content

Some questions #1

@flip111

Description

@flip111

Hello i was reading through the readme and i have some questions

This library is an implementation of a trivial pub/sub model for PureScript

The library doesn't look so trivial, it also has 66 commits. Don't really get how it's trivial, care to explain??

It tries to immitate similar functionality to Chans from Haskell, but isn't nearly as cool.

What's more cool about Chans from Haskell ?

Queue, IxQueue, Queue.One

Did i understand correctly that:

  • Queue: will trigger all handlers. Handlers must remain present and can only be added
  • IxQueue: triggers none, one or more handlers. Handlers can be add or removed at will.
  • Queue.One: triggers one handler. The single handler must be present at all times.

Queue.Aff is useful when you might have multiple registerSyncOnce

This section is not very clear because it requires knowledge of what registerSyncOnce is doing

Queue.Aff ... if you know the network statically (deletion clears all of them).

Not sure what is deleted here. Something is deleted but the handlers must stay registered?

IxQueue.Aff is useful when you need async calls, but need to integrate into an existing IxQueue of other recipients.

So it's possible to take an IxQueue and integrate it into another IxQueue? Can you tell something about this scenario?

An advantage of Queue.Aff and Queue.One.Aff, naturally, is they don't need to be registered before invoked

What does it mean to register Queue or Queue.One?

The behavior of this library is such that, if no handlers are registered, then store pending messages first-in-first-out until one is available.

What does this mean? I see it's possible to take the first or last

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