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

Thread.suspend produces runtime errors #200

Closed
vishweshjatala opened this issue Nov 4, 2020 · 2 comments · May be fixed by mozart/mozart2#332
Closed

Thread.suspend produces runtime errors #200

vishweshjatala opened this issue Nov 4, 2020 · 2 comments · May be fixed by mozart/mozart2#332

Comments

@vishweshjatala
Copy link

vishweshjatala commented Nov 4, 2020

I am trying to use the construct Thread.suspend in my program as:

{Thread.suspend Thread.this}

It produces the following runtime error. Kindly look into the issue.

%***************** Error: illegal field selection ***************
%**
%** In statement: R . suspend = _
%** Expected fields: getPriority getThisPriority injectException is preempt setPriority setThisPriority state terminate this
%** Record value: 'thread'(getPriority:<P/2 Thread.getPriority> getThisPriority:<P/1 GetThisPriority> injectException:<P/2 Thread.injectException> is:<P/2 Thread.is> preempt:<P/1 Thread.preempt> setPriority:<P/2 Thread.setPriority> setThisPriority:<P/1 SetThisPriority> state:<P/2 Thread.state> terminate:<P/1 Thread.terminate> this:<P/1 Thread.this>)
%**
%** Call Stack:
%** toplevel abstraction in line 1, column 0, PC = 50460005

@layus
Copy link
Member

layus commented Nov 4, 2020

The error means that the value Thread does not contain an entry suspend. You can only pick among

getPriority getThisPriority injectException is preempt setPriority setThisPriority state terminate this

The spec at http://mozart2.org/mozart-v1/doc-1.4.0/base/thread.html has it tough, so I guess it is missing in the implem.

@layus
Copy link
Member

layus commented Nov 6, 2020

Also, I guess you are using mozart2, so the right place to discuss this is at mozart/mozart2#332 :-)

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

Successfully merging a pull request may close this issue.

2 participants