Skip to content
This repository has been archived by the owner on Oct 25, 2021. It is now read-only.

Support returning .NET 5 threads to ObjC #775

Open
ghost opened this issue May 4, 2020 · 1 comment
Open

Support returning .NET 5 threads to ObjC #775

ghost opened this issue May 4, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented May 4, 2020

My .Net class library that I want to embeddinate contains two simple threads that I start.

Steps to Reproduce

  1. Build VB IOS class library .Net Standard project on Mac
    My .NET IOS class lib starts two threads...............
		Imports System.Threading
		Imports System
		Imports System.IO

		dim RF_glucose_Thread as thread
		RF_glucose_Thread = new Thread( AddressOf RF_glucose_executive )
		RF_glucose_Thread.Name = "RF GLUCOSE ALG"
		RF_glucose_Thread.Start()		

		public embedded_communication_thread as thread
		embedded_communication_thread = new Thread( AddressOf run_acquisition_session )
		embedded_communication_thread.Name = "COMM RF HW"
		embedded_communication_thread.Priority =  std.RF_HW_COMMUNICATION_THREAD_PRIORITY
		embedded_communication_thread.Start()				
  1. Run objcgen to generate ObjC from .Net

Expected Behavior

ObjC generation of threading used within library

Actual Behavior

objcgen outputs:
error EM0009: The feature Returning type Thread from native code is not currently supported by the tool

Environment

.Net Standard 2.0

Build Logs

Example Project (If Possible)

@chamons
Copy link
Contributor

chamons commented May 8, 2020

The tool does not support passing threads to Objective-C, as we'd have to bind all of the API you can invoke on threads as well.

You should be able to create a wrapper with a limited subset of functions (and it not public).

I'll keep this open as a feature request.

@chamons chamons added this to the Future milestone May 8, 2020
@chamons chamons changed the title Can Embeddinator generate ObjC threading from .Net Threading? Support returning .NET 5 threads to ObjC May 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant