Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
quasar-wayland
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jens Nolte
quasar-wayland
Commits
712f37af
Commit
712f37af
authored
3 years ago
by
Jens Nolte
Browse files
Options
Downloads
Patches
Plain Diff
Update quasar
parent
ffa4083e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
example/Main.hs
+1
-1
1 addition, 1 deletion
example/Main.hs
flake.lock
+6
-6
6 additions, 6 deletions
flake.lock
src/Quasar/Wayland/Connection.hs
+8
-13
8 additions, 13 deletions
src/Quasar/Wayland/Connection.hs
with
15 additions
and
20 deletions
example/Main.hs
+
1
−
1
View file @
712f37af
...
@@ -7,7 +7,7 @@ import Quasar.Wayland.Client
...
@@ -7,7 +7,7 @@ import Quasar.Wayland.Client
main
::
IO
()
main
::
IO
()
main
=
do
main
=
do
withResourceManager
M
do
withR
ootR
esourceManager
do
traceIO
"Connecting"
traceIO
"Connecting"
client
<-
connectWaylandClient
client
<-
connectWaylandClient
traceIO
"Connected"
traceIO
"Connected"
...
...
This diff is collapsed.
Click to expand it.
flake.lock
+
6
−
6
View file @
712f37af
...
@@ -23,11 +23,11 @@
...
@@ -23,11 +23,11 @@
},
},
"locked": {
"locked": {
"host": "git.c3pb.de",
"host": "git.c3pb.de",
"lastModified": 163
1852696
,
"lastModified": 163
8315058
,
"narHash": "sha256-
sM5h2IHVyB0kKMNz44042D6QVvsTyUhaOCYkdcEjabQ
=",
"narHash": "sha256-
SA99IShGlTc3IkcqG5YP/lnSyTWWHFIdvci5pWR8BrI
=",
"owner": "jens",
"owner": "jens",
"repo": "quasar",
"repo": "quasar",
"rev": "
862976c067cc41435e1087def16dfb86c57b317b
",
"rev": "
7f163062fd2dc98041b5149c5ab23fd8cedde7e6
",
"type": "gitlab"
"type": "gitlab"
},
},
"original": {
"original": {
...
@@ -46,11 +46,11 @@
...
@@ -46,11 +46,11 @@
},
},
"locked": {
"locked": {
"host": "git.c3pb.de",
"host": "git.c3pb.de",
"lastModified": 163
1899417
,
"lastModified": 163
8330205
,
"narHash": "sha256-
qSD1O3x/oCgrm6v1GGSO2d+rO0jMs2zi8yASXhPyHN0
=",
"narHash": "sha256-
vVdNLDtS7mmj5FLJ7/lL0mJ9r05ZLhJQoRAlmDa7OC4
=",
"owner": "jens",
"owner": "jens",
"repo": "quasar-network",
"repo": "quasar-network",
"rev": "
fda985686d4003c85c53bbb1654cf5324ae4e7c2
",
"rev": "
12c98e410f4a6d96b9ea2390da1edc6d026ad7ae
",
"type": "gitlab"
"type": "gitlab"
},
},
"original": {
"original": {
...
...
This diff is collapsed.
Click to expand it.
src/Quasar/Wayland/Connection.hs
+
8
−
13
View file @
712f37af
...
@@ -51,18 +51,16 @@ newWaylandConnection initializeProtocolAction socket = do
...
@@ -51,18 +51,16 @@ newWaylandConnection initializeProtocolAction socket = do
registerDisposeAction
$
closeConnection
connection
registerDisposeAction
$
closeConnection
connection
runUnlimitedAsync
do
connectionThread
connection
$
sendThread
connection
connectionThread
connection
$
sendThread
connection
connectionThread
connection
$
receiveThread
connection
connectionThread
connection
$
receiveThread
connection
pure
(
result
,
connection
)
pure
(
result
,
connection
)
connectionThread
::
Monad
Async
m
=>
WaylandConnection
s
->
IO
()
->
m
()
connectionThread
::
Monad
ResourceManager
m
=>
WaylandConnection
s
->
IO
()
->
m
()
connectionThread
connection
work
=
async
_
$
liftIO
$
work
`
catches
`
[
ignoreCancelTask
,
traceAndDisposeConnection
]
connectionThread
connection
work
=
async
WithHandler_
traceAndDisposeConnection
$
liftIO
$
work
where
where
ignoreCancelTask
::
Handler
IO
a
traceAndDisposeConnection
::
SomeException
->
IO
()
ignoreCancelTask
=
Handler
(
throwM
::
CancelTask
->
IO
a
)
traceAndDisposeConnection
ex
=
traceIO
(
displayException
ex
)
>>
void
(
dispose
connection
)
traceAndDisposeConnection
=
Handler
(
\
(
ex
::
SomeException
)
->
traceIO
(
displayException
ex
)
>>
void
(
dispose
connection
))
sendThread
::
WaylandConnection
s
->
IO
()
sendThread
::
WaylandConnection
s
->
IO
()
sendThread
connection
=
forever
do
sendThread
connection
=
forever
do
...
@@ -83,8 +81,5 @@ receiveThread connection = forever do
...
@@ -83,8 +81,5 @@ receiveThread connection = forever do
feedInput
connection
.
protocolHandle
bytes
feedInput
connection
.
protocolHandle
bytes
closeConnection
::
WaylandConnection
s
->
IO
(
Awaitable
()
)
closeConnection
::
WaylandConnection
s
->
IO
()
closeConnection
connection
=
do
closeConnection
connection
=
Socket
.
close
connection
.
socket
-- gracefulClose may fail but guarantees that the socket is deallocated
Socket
.
close
connection
.
socket
`
catch
`
\
(
_
::
SomeException
)
->
pure
()
pure
$
pure
()
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