SyncEvent: clarification about manual parameter
Nobody has claimed this yet.
- Dominant language
- XML
- Stars
- 2
- Forks
- 6
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 5
Description
From manual page: https://php.net/syncevent.construct
current description of manual parameter says:
Manual reset event objects allow all waiting processes through until the object is reset.
which mentions only the custom object (manual=true), but not the default (manual=false).
maybe clarify with something like this:
By default, SyncEvent object reset()s automatically after successful wait()ing.
This behavior is disabled with manual set true - object must reset() explicitly to prevent waiting processes through.
Custom behavior may be demonstrated by this example:
<?php declare(strict_types=1);
$e = new SyncEvent('example', 1, 1);# manual=true, prefire=true
$e->wait();# will not wait (prefire=true)
$e->wait();# will not wait (manual=true, was not reset)
$e->reset();
$e->wait(1000);# will wait here
?>
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Use the linked SyncEvent constructor manual page as the entry point and locate the documentation for its manual parameter. Clarify both the default automatic-reset behavior and the explicit-reset behavior when manual is true, using the supplied example if appropriate; the work is done when the parameter description covers both modes accurately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100