Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
stm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
stm
Commits
34cc1f19
Commit
34cc1f19
authored
1 year ago
by
konsumlamm
Browse files
Options
Downloads
Patches
Plain Diff
Update implementation note
parent
73cb3d20
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Control/Concurrent/STM/TBQueue.hs
+2
-3
2 additions, 3 deletions
Control/Concurrent/STM/TBQueue.hs
with
2 additions
and
3 deletions
Control/Concurrent/STM/TBQueue.hs
+
2
−
3
View file @
34cc1f19
...
...
@@ -22,8 +22,7 @@
-- maximum number of elements, then 'writeTBQueue' blocks until an
-- element is removed from the queue.
--
-- The implementation is based on the traditional purely-functional
-- queue representation that uses two lists to obtain amortised /O(1)/
-- The implementation is based on an array to obtain /O(1)/
-- enqueue and dequeue operations.
--
-- @since 2.4
...
...
@@ -59,7 +58,7 @@ import Control.Concurrent.STM.TArray
--
-- @since 2.4
data
TBQueue
a
=
TBQueue
{-# UNPACK #-}
!
(
TVar
Int
)
-- read index
=
TBQueue
{-# UNPACK #-}
!
(
TVar
Int
)
-- read index
{-# UNPACK #-}
!
(
TVar
Int
)
-- write index
{-# UNPACK #-}
!
(
TArray
Int
(
Maybe
a
))
-- elements
{-# UNPACK #-}
!
Int
-- initial capacity
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment