A thread-safe wrapper over array-like LONG storage. All operations are synchronised with a critical section so the container can be shared between PB threads.
A thread-safe wrapper over array-like LONG storage. All operations are synchronised with a critical section so the container can be shared between PB threads.
Kind: Container | Category: H-Lib Native Containers
PBXB64 Status: AVAILABLE
PBXB64 Certification: [CERTIFIED TESTED]
This H-Lib container is implemented in native C support code and exposed through PBXB64 BASIC container syntax. The examples below are focused usage patterns; keep handles valid, release each container with its Final method, and check counts or return values when a method can fail.
| Method | Signature | Returns | Description |
|---|---|---|---|
| New | s.New | LNSAFE | Allocate a new safe container. |
| Final | s.Final | none | Free the container. |
| Validate | s.Validate | LONG | Non-zero if the handle is valid. |
| Clear | s.Clear | none | Remove all values. |
| Count | s.Count | LONG | Number of values stored. |
| Empty | s.Empty | LONG | Non-zero if the container is empty. |
| Lock | s.Lock | none | Acquire the critical section. |
| Unlock | s.Unlock | none | Release the critical section. |
| Push | s.Push value | none | Append a value (locks automatically). |
| Pop | s.Pop | QUAD | Remove and return the top value. |
| Peek | s.Peek | QUAD | Return the top value without removing it. |
Validation evidence: H-Lib container behavior is exercised by registered BASIC container validation programs and the embedded H-Lib object set used by the single-EXE validation gate.
Diese Referenzseite soll durch ein fokussiertes Compile- oder Laufzeitbeispiel belegt sein. Das Beispiel soll Eingaben, erwartete Ausgabe oder Exit-Code und erforderliche Windows-Ressourcen oder Include-Dateien nennen.
Allgemeine Übersichtsseiten sollten trotzdem sagen, welche Familie gemeint ist, welche konkreten Befehlsseiten die Implementierung tragen und welche Formen nur der Navigation dienen. So bleibt die Seite detailliert genug, ohne so zu tun, als wäre sie eine vollständige Befehlsreferenz.
LOCAL s AS LNSAFE s = s.New s.Push 42 s.Lock PRINT s.Peek ' 42 s.Unlock s.Final