Commit Graph

13 Commits

Author SHA1 Message Date
Xavi Artigas dc05cbbee8 docs: Fix typos and wrap EO files to 120 chars
As per our style guide:
https://www.enlightenment.org/contrib/docs/eo-guide.md
2019-09-02 16:24:26 +02:00
Carsten Haitzler d4c123d360 efl loops/threads - by defaylt tasks (exe and threads) exit with parent
this also defers parent exit until all children exit and will wait
around looping until those children do report back with exited status
etc. - this meay mean some hangs for badly written/blocking apps that
have efl thrrads that refuse to exit. a slight policy change also
means that by default thread objects also get auto-deleted whent hey
report back exit codes etc. which leads to less code if you don't care
about this.
2019-08-26 14:19:30 +01:00
Xavi Artigas 333330a6e5 Mark BETA classes individually
Summary:
Instead of surrounding all the #include "*.eo.h" lines in Efl.h
with #ifdef EFL_BETA_API_SUPPORT, include these files unconditionally, but mark
all classes as @beta in the eo files.
This will allow taking them out of beta one by one as we deem them stable enough.
Otherwise, the current procedure involves moving the #include line out of the
ifdef block, which is cumbersome and messes include order.

Depends on D7950
Fixes T7692

Test Plan: Nothing changes

Reviewers: zmike, bu5hm4n, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7692

Differential Revision: https://phab.enlightenment.org/D7951
2019-02-14 17:46:50 +01:00
Marcel Hollerbach 3b262340ba Revert "Revert command line array object because it's broken by design"
This reverts commit a57c7f7510.

I pretty much hate to just revert your revert, but you failed to read my
replies, and failed to understand what i was talking about.

And YES we talked at fosdem about the platform issue, and do you
remember my answer, that back in time this might be the case, today is
different freebsd suppoerts setenv, and for windows we have a setenv
implementation in evil. And yes, vtorri also created a issue how bad and
evil this commit is, however, i still fail to see the issue since setenv
unsetenv and clearenv usages are taken as needed. (T7693)

The ownership question is answered in
https://phab.enlightenment.org/D7516#137367.

Can we please get into a state of technical discussions, and not *oh
shit, i am going to revert this* this has been in review for a long
time, a lots of people have tested it, we discussed things on it, and
there was 3 weeks of no reply from you.

The issues that exist will be dealed with. Feel free to create tasks if
you want :)
2019-02-12 21:42:33 +01:00
Carsten Haitzler a57c7f7510 Revert command line array object because it's broken by design
Revert "ecore: get rid of commands in efl_task."
  This reverts commit 616381e9cf.
Revert "ecore: here comes a command line object"
  This reverts commit 48e5684b3c.

1. this is broken:

EOLIAN static const char*
_efl_core_command_line_command_get(const Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd)
{
   return eina_strdup(pd->string_command);
}

it returns a const char * BUT it duplicates it on return. no. a big
fat honking NO. return a char * or don't duplicate. pick.

2. _efl_core_command_line_command_array_set() is broken by design. it
accepts an array of strings, but the strings are owned by the caller
who creates the array (requiring they free them up themselves after
this call) but the array becomes owned by the callee. the code here frees the
incoming array but doesn't care about the string content of it. it's
leak heaven waiting to happen (or bugs when someone wants to access
the array they create to walk it to free the strings they put into it
after it is set).

i brought this up and it was dismissed. now exactly he issue i brought
up is there with mixed ownership and the added complexity as well as
transfer of some ownership but not others.

go back and think about this so it isn't broken by design.
2019-02-12 19:54:35 +00:00
Marcel Hollerbach 616381e9cf ecore: get rid of commands in efl_task.
Note that the usage in efl_thread.c should and could be removed.
the problem with its usage is that when the ARGUMENTS event is fired,
noone ever had the chance to subscribe to the loop of the thread yet. So
all in all this is unneccessary, since noone could ever touch that.

Differential Revision: https://phab.enlightenment.org/D7517
2019-02-12 11:19:28 +01:00
WooHyun Jung 0b0ff33f2f efl_task: remove efl.io.* interfaces
Remove efl.io.* interfaces from efl_task, and make other extended
classes properly.

ref T7657

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Differential Revision: https://phab.enlightenment.org/D7747
2019-01-25 13:47:21 -06:00
Marcel Hollerbach 34efdfb1b1 efl: convert all classes to the new eolian syntax
ref T7459

Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7684
2019-01-18 16:31:26 +01:00
Daniel Kolesa 577c00789a eolian: second batch of unused import removals
This fixes all remaining occurences introduced by false negatives
in 6bcd70f01d. The rest was already
fixed in 6be3809c04.
2018-05-13 18:13:12 +02:00
Daniel Kolesa 6be3809c04 eolian: first batch of unused import removals
Initial results of our static analysis showed a bunch of unused
imports or imports used only for documentation references. In the
first case, remove entirely, in the second case, change to 'parse'
in order to keep references working.

The static analysis is not perfect and yields false negatives for
certain cases, so there will be a second batch later.
2018-05-13 17:28:47 +02:00
Carsten Haitzler 6865ad1773 ecore - efl threads - add thredio class
this adds a simple indata and outdata void ptr to begin that you can
set on efl.thread objects (set the indata) and get the outdata too to
get results. then on the efl.appthread side the indata is set on the
efl.appthread before it runs and on quit the thresad can set the
outdata on the appthread, and this appears back on the efl.thread
object in the parent thread.

so you can basically share pointers to anything in and out this way on
start/exit in addition to string args etc.

the reason i made it an extra class (mixin actually) is for future
expansion. sharing more complex data - eina values maybe or objects as
long as they are shared objects, and perhaps acting as an interface
for calling a function at the other end like ecore_thread_async_call
etc.
2018-03-07 02:32:15 +09:00
Carsten Haitzler 1bdd9e4dd1 ecore - a different take on efl.app class as a super class to efl.loop
so the MAIN loop is actually an efl.app object. which inherits from
efl.loop. the idea is that other loops in threads will not be efl.app
objects. thread on the creator side return an efl.thread object.
inside the thread, like the mainloop, there is now an efl.appthread
object that is for all non-main-loop threads.

every thread (main loop or child) when it spawns a thread is the
parent. there are i/o pipes from parnet to child and back. so parents
are generally expected to, if they want to talk to child thread, so
use the efl.io interfaces on efl.thread, and the main loop's elf.app
class allows you to talk to stdio back to the parent process like the
efl.appthread does the same using the efl.io interfaces to talk to its
parent app or appthread. it's symmetrical

no tests here - sure. i have been holding off on tests until things
settle. that's why i haven't done them yet. those will come back in a
subsequent commit

for really quick examples on using this see:

https://phab.enlightenment.org/F2983118
https://phab.enlightenment.org/F2983142

they are just my test code for this.

Please see this design document:

https://phab.enlightenment.org/w/efl-loops-threads/
2018-03-03 13:40:33 +09:00
Carsten Haitzler 47ff2d8126 ecore - start work on efl task/exe/thread
this is  astart of the work for having a common task class/interface
between loops, threads ane exe's so the i/o is all symmetric and works
the same way between all of them as well as similarly for launching
and knowing when the exit etc. etc.

this is not final and not perfect, but it's a start. comments of
course welcome
2018-02-21 16:56:38 +09:00