Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xxdk-wasm
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor 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
elixxir
xxdk-wasm
Commits
487a6b70
Commit
487a6b70
authored
2 years ago
by
Jono Wenger
Browse files
Options
Downloads
Patches
Plain Diff
Remove postMessageTransferList since it does not look like it is possible from wasm
parent
6db70285
No related branches found
No related tags found
2 merge requests
!67
fix for latest client release
,
!52
XX-4382 / Move indexedDb databases to web workers
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indexedDb/messageHandler.go
+0
-14
0 additions, 14 deletions
indexedDb/messageHandler.go
indexedDbWorker/worker.go
+3
-18
3 additions, 18 deletions
indexedDbWorker/worker.go
with
3 additions
and
32 deletions
indexedDb/messageHandler.go
+
0
−
14
View file @
487a6b70
...
...
@@ -166,17 +166,3 @@ func (mh *MessageHandler) addEventListeners() {
func
(
mh
*
MessageHandler
)
postMessage
(
aMessage
any
)
{
js
.
Global
()
.
Call
(
"postMessage"
,
aMessage
)
}
// postMessageTransferList sends an array of Transferable objects to transfer to
// the main thread. This is meant to be used to transfer large amounts of binary
// data using a high-performance, zero-copy operation. Refer to the doc for more
// information.
//
// Note: The binary data cannot simply be passed as the transferList. The
// traversable objects must be specified in the aMessage and included in the
// transferList
//
// Doc: https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/postMessage
func
(
mh
*
MessageHandler
)
postMessageTransferList
(
aMessage
,
transferList
any
)
{
js
.
Global
()
.
Call
(
"postMessage"
,
aMessage
,
transferList
)
}
This diff is collapsed.
Click to expand it.
indexedDbWorker/worker.go
+
3
−
18
View file @
487a6b70
...
...
@@ -21,10 +21,9 @@ import (
// TODO:
// 1. Fix ID counter
// 2. Use transfer list when sending
// 3. Get path to JS file from bindings
// 4. restructure packages
// 5. fix tag system
// 2. Get path to JS file from bindings
// 3. restructure packages
// 4. fix tag system
// InitID is the ID for the first item in the handler list. If the list only
// contains one handler, then this is the ID of that handler. If the list has
...
...
@@ -267,20 +266,6 @@ func (wh *WorkerHandler) postMessage(msg any) {
wh
.
worker
.
Call
(
"postMessage"
,
msg
)
}
// postMessageTransferList sends an array of Transferable objects to transfer to
// the worker. This is meant to be used to transfer large amounts of binary data
// using a high-performance, zero-copy operation. Refer to the doc for more
// information.
//
// Note: The binary data cannot simply be passed as the transferList. The
// traversable objects must be specified in the aMessage and included in the
// transferList
//
// Doc: https://developer.mozilla.org/en-US/docs/Web/API/Worker/postMessage#transfer
func
(
wh
*
WorkerHandler
)
postMessageTransferList
(
msg
,
transferList
any
)
{
wh
.
worker
.
Call
(
"postMessage"
,
msg
,
transferList
)
}
// newWorkerOptions creates a new Javascript object containing optional
// properties that can be set when creating a new worker.
//
...
...
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