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

add CBA_fnc_directCall #234

Merged
merged 6 commits into from
Jan 10, 2016
Merged

add CBA_fnc_directCall #234

merged 6 commits into from
Jan 10, 2016

Conversation

commy2
Copy link
Contributor

@commy2 commy2 commented Jan 10, 2016

This is the best I can come up with.

required for #230

Makes the call atomic by reducing it to a pushBack.

can be confirmed working with:

TEST = {systemChat str (call CBA_fnc_isScheduled)};

call TEST;
0 spawn {
    call TEST;
    TEST call CBA_fnc_directCall;
};

-> false
-> true
-> false

Name does not conflict, because the old one is named CBA_common_fnc_directCall

@commy2
Copy link
Contributor Author

commy2 commented Jan 10, 2016

Performance test:

new:
cba_fnc_directCall
10000/10000
0.0880981 ms
0.0400024 ms

old:
cba_common_fnc_directCall
1175/10000
1.49186 ms

The old one also breaks when used twice in the same frame. (Only the last directCall would be used)

Killswitch00 added a commit that referenced this pull request Jan 10, 2016
@Killswitch00 Killswitch00 merged commit 18e898a into master Jan 10, 2016
@ViperMaul ViperMaul modified the milestone: 2.2.1 Jan 18, 2016
@thojkooi thojkooi deleted the directCall branch April 25, 2016 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants