Skip to content

Commit bddd72a

Browse files
authored
Merge pull request #227 from matrix-org/refactor/allow-disabling-cross-process-lock
Use `CrossProcessLockConfig`
2 parents 52bbf25 + fa5e44b commit bddd72a

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

internal/api/rust/rust.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func NewRustClient(t ct.TestLike, opts api.ClientCreationOpts) (api.Client, erro
9292
xprocessName := opts.GetExtraOption(CrossProcessStoreLocksHolderName, "").(string)
9393
if xprocessName != "" {
9494
t.Logf("setting cross process store locks holder name=%s", xprocessName)
95-
ab = ab.CrossProcessStoreLocksHolderName(xprocessName)
95+
ab = ab.CrossProcessLockConfig(matrix_sdk_ffi.CrossProcessLockConfigMultiProcess { xprocessName })
9696
}
9797
// @alice:hs1, FOOBAR => alice_hs1_FOOBAR
9898
username := strings.Replace(opts.UserID[1:], ":", "_", -1) + "_" + opts.DeviceID
@@ -417,12 +417,6 @@ func (c *RustClient) StartSyncing(t ct.TestLike) (stopSyncing func(), err error)
417417
// > thread '<unnamed>' panicked at 'there is no reactor running, must be called from the context of a Tokio 1.x runtime'
418418
// where the stack trace doesn't hit any test code, but does start at a `free_` function.
419419
sb := c.FFIClient.SyncService()
420-
xprocessName := c.opts.GetExtraOption(CrossProcessStoreLocksHolderName, "").(string)
421-
if xprocessName != "" {
422-
sb2 := sb.WithCrossProcessLock()
423-
sb.Destroy()
424-
sb = sb2
425-
}
426420
defer sb.Destroy()
427421
syncService, err := sb.Finish()
428422
if err != nil {

0 commit comments

Comments
 (0)