Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deadlock problems still exist in version 0.17 #38

Open
Shuenhoy opened this issue Aug 17, 2020 · 0 comments
Open

Deadlock problems still exist in version 0.17 #38

Shuenhoy opened this issue Aug 17, 2020 · 0 comments
Labels

Comments

@Shuenhoy
Copy link

Try this code copied from gluon-lang/gluon#842.

type Digit a =
    | One a
    | Two a a
    | Three a a a
    | Four a a a a

type Node b =
    | Node2 b b
    | Node3 b b b

type FingerTree c =
    | Empty
    | Single c
    | Deep (Digit c) (FingerTree (Node c)) (Digit c)

type View d =
    | Nil
    | View d (FingerTree d)

rec let viewl xs : FingerTree e -> View e =
    match xs with
    | Empty -> Nil
    | Single x -> View x Empty
    | Deep (One a) deeper suffix ->
        match viewl deeper with
        | View (Node2 b c) rest -> View a (Deep (Two b c) rest suffix)
        | View (Node3 b c d) rest -> View a (Deep (Three b c d) rest suffix)
        | Nil ->
            match suffix with
            | One w -> View a (Single w)
            | Two w x -> View a (Deep (One w) Empty (One x))
            | Three w x y -> View a (Deep (Two w x) Empty (One y))
            | Four w x y z -> View a (Deep (Three w x y) Empty (One z))
    | Deep (Two a b) deeper suffix -> View a (Deep (One b) deeper suffix)
    | Deep (Three a b c) deeper suffix -> View a (Deep (Two b c) deeper suffix)
    | Deep (Four a b c d) deeper suffix -> View a (Deep (Three b c d) deeper suffix)
viewl

Find this line type View d =, modify the d to a, save the file. If nothing happens, modify a back to d, save. Repeat this procedure for a few times and the LSP would lock up.

Based on the experiences of my attempts to find out the problems, this probably happens here:

thread
.get_database_mut()
.add_module(module_name.into(), &source);

But I didn't find out who is blocking it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants