Comments (3)
As you mentioned, Post
method does not guarantee the order of call.
Our implementation is depend on EFL. So behavior of API also same with EFL
And Post
method implemented with ecore_idler_add. ecore_idler_add also does not guaranteed
from tizenfx.
Yes, you're right.
It should be called idle step on main loop iteration.
I also expected ecore_main_loop_safe_call_async working as asynchronous but does not
Fortunately, EcoreSynchronizationContext is not used in normal case.
Instead TizenSynchronizationContext is used
If you need a Post
behavior on your application, You can use EcoreMainloop.Post
method
Anyway, I'll fix it
Thanks your reports
from tizenfx.
Hello,
Your change fixes the reported problem, however it introduces another one. Basically, the documentation doesn't mention anything about call order, but some applications expect that:
EcoreMainLoop.Post(action1);
EcoreMainLoop.Post(action2);
will result that action1 will be called before action2. That's not true for Post method (and PostAndWakeUp called on the main thread). Please check following snippet:
for (var i = 0; i < 10; ++i)
{
var val = i;
EcoreMainloop.PostAndWakeUp(() => { Log.Info("LoopTest", $"{val}"); });
}
When called on the main thread, it prints:
I/LoopTest(10974): XamarinPlayer.Tizen.cs: OnCreate(61) > 9
I/LoopTest(10974): XamarinPlayer.Tizen.cs: OnCreate(61) > 8
I/LoopTest(10974): XamarinPlayer.Tizen.cs: OnCreate(61) > 7
I/LoopTest(10974): XamarinPlayer.Tizen.cs: OnCreate(61) > 6
I/LoopTest(10974): XamarinPlayer.Tizen.cs: OnCreate(61) > 5
I/LoopTest(10974): XamarinPlayer.Tizen.cs: OnCreate(61) > 4
I/LoopTest(10974): XamarinPlayer.Tizen.cs: OnCreate(61) > 3
I/LoopTest(10974): XamarinPlayer.Tizen.cs: OnCreate(61) > 2
I/LoopTest(10974): XamarinPlayer.Tizen.cs: OnCreate(61) > 1
I/LoopTest(10974): XamarinPlayer.Tizen.cs: OnCreate(61) > 0
When called on a non-main thread, it prints:
I/LoopTest(10974): XamarinPlayer.Tizen.cs: OnCreate(70) > 0
I/LoopTest(10974): XamarinPlayer.Tizen.cs: OnCreate(70) > 1
I/LoopTest(10974): XamarinPlayer.Tizen.cs: OnCreate(70) > 2
I/LoopTest(10974): XamarinPlayer.Tizen.cs: OnCreate(70) > 3
I/LoopTest(10974): XamarinPlayer.Tizen.cs: OnCreate(70) > 4
I/LoopTest(10974): XamarinPlayer.Tizen.cs: OnCreate(70) > 5
I/LoopTest(10974): XamarinPlayer.Tizen.cs: OnCreate(70) > 6
I/LoopTest(10974): XamarinPlayer.Tizen.cs: OnCreate(70) > 7
I/LoopTest(10974): XamarinPlayer.Tizen.cs: OnCreate(70) > 8
I/LoopTest(10974): XamarinPlayer.Tizen.cs: OnCreate(70) > 9
Example when such behavior causes a problem can be found here:
https://github.com/Samsung/react-native-tizen-dotnet/blob/master/Framework/ReactNet/ReactNativeTizen/DevSupport/DevOptionDialog.cs
The line 92 is executed after 46.
from tizenfx.
Related Issues (20)
- Bluetooth LE - advertising stops automatically HOT 2
- Inconsistent API in GPIO edge callback HOT 3
- NUI Lottie performance HOT 2
- Question/Possible bug after update to Tizen 5.5 HOT 2
- Issues with Tizen.Applications.DirectoryInfo constructor HOT 11
- Error: with privileges HOT 1
- sqlite
- GPIO output pin init high state does not work. HOT 1
- [WebView] How to clear all cached data? HOT 3
- Improper BaselineDpi is given for UHD screen. HOT 2
- Badge API returns errors when default app certificate is used. HOT 1
- `new CultureInfo()` throws an exception in Invariant Mode. (on .NET 6) HOT 2
- [NUI.Components.CheckBox] SelectedChanged event doesn't invoke when IsSelected is changed by setter. HOT 2
- Wrong property name
- RelativeLayout Issue on DefaultLinearItem and DefaultGridItem. HOT 6
- Duplicated TextChanged event handler in TextField
- [NUI] AccessibilityCalculateStatesWrapper Missing null check
- Question: how to change input source? HOT 1
- [Tdbc] Avoid managed obj creation. HOT 4
- [PrivacyPrivilegeManager] Crash while checking permission on TV profile HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tizenfx.