Skip to content

SubmitUpdates not thread safe #173

Description

Hi,

I don't think this is an issue, as it relies on how .NET handles SQL stuff afaik, so feel free to close this.

Minimal repro:

let ctx1 = dbSchema.GetDataContext()
let duration eventName f =  
    let timer = new System.Diagnostics.Stopwatch()
    timer.Start()
    let returnValue = f()
    ctx1.``[DBO].[LOGGING]``.Create(
      DateTime.Now
      , sprintf "%O" timer.Elapsed
      ,eventName
      ,1) |> ignore
    ctx1.SubmitUpdates()
    returnValue
[| 0..2000|] |> Array.Parallel.map (fun k -> duration "abc" (fun () -> k+1))

This returns : ,"Unchanged entity encountered in update list - this should not be possible!"
Edit: fix typo

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions