terminal/src/inc
Leonard Hecker b62f5ea850
Added til::spsc, a lock-free, single-producer/-consumer FIFO queue (#6751)
## Summary of the Pull Request

This PR adds the `til::spsc` namespace, which implements a lock-free, single-producer, single-consumer FIFO queue ("channel"). The queue efficiently blocks the caller using Futexes if no data can be written to / read from the queue (e.g. using `WaitOnAddress` on Windows). Furthermore it allows batching of data and contains logic to signal the caller if the other side has been dropped/destructed.

## PR Checklist
* [ ] Closes #xxx
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [x] Tests added/passed
* [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
* [ ] Schema updated.
* [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

## Detailed Description of the Pull Request / Additional comments

`til::spsc::details::arc<T>` contains most of the queue's logic and as such has the relevant documentation for its design.

## Validation Steps Performed

The queue was tested on Windows, Linux and macOS using MSVC, gcc and llvm and each of their available runtime introspection utilities in order to ensure no race conditions or memory leaks occur.
2020-07-16 20:49:06 +00:00
..
CppCoreCheck Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
test Improve conpty rendering of default colors in legacy apps (#6698) 2020-07-01 11:08:30 -07:00
til Added til::spsc, a lock-free, single-producer/-consumer FIFO queue (#6751) 2020-07-16 20:49:06 +00:00
argb.h add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
conattrs.hpp Add support for the "faint" graphic rendition attribute (#6873) 2020-07-13 17:44:09 +00:00
conime.h Replace basic_string_view<T> with span<const T> (#6921) 2020-07-15 16:40:42 +00:00
conint.h Merge remote-tracking branch 'origin/inbox' into HEAD 2020-02-03 15:16:52 -08:00
conpty-static.h Add support for win32-input-mode to conhost, ConPTY, Terminal (#6309) 2020-06-08 22:31:28 +00:00
conpty.h add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
consoletaeftemplates.hpp Fix copying wrapped lines by implementing better scrolling (#5181) 2020-04-09 00:06:25 +00:00
contsf.h add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
cpl_core.h Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
DefaultSettings.h Remove the rowsToScroll setting and just always use the system setting (#6891) 2020-07-14 01:38:11 +00:00
HostAndPropsheetIncludes.h Introduce UiaTextRangeBase::FindText() for Accessibility (#4373) 2020-01-31 23:26:19 +00:00
ITerminalOutputConnection.hpp Apply audit mode to TerminalInput/Adapter/Parser libraries (#4005) 2020-01-03 14:25:21 +00:00
ITerminalOwner.hpp Revert locking changes (#3488) 2019-11-08 13:44:52 -08:00
LibraryIncludes.h Move to GSL 3.1.0 (#6908) 2020-07-14 18:30:59 +00:00
operators.hpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
til.h Added til::spsc, a lock-free, single-producer/-consumer FIFO queue (#6751) 2020-07-16 20:49:06 +00:00
unicode.hpp The Azure cloud shell connector (#1808) 2019-07-25 13:31:41 -07:00
VtIoModes.hpp Remove the WinTelnetEngine (#6526) 2020-06-17 16:29:49 +00:00