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

[core] Fixed C++11 build (win) #1281

Merged

Conversation

maxsharabayko
Copy link
Collaborator

@maxsharabayko maxsharabayko commented May 11, 2020

Fixed some places where pthreads was still in use.

TODO

  • Handle the case if (pthread_equal(pthread_self(), m_WorkerThread))

@maxsharabayko maxsharabayko added Type: Maintenance Work required to maintain or clean up the code [core] Area: Changes in SRT library core labels May 11, 2020
@maxsharabayko maxsharabayko added this to the v1.5.0 milestone May 11, 2020
@maxsharabayko maxsharabayko added this to In Progress in Development May 11, 2020
srtcore/queue.cpp Outdated Show resolved Hide resolved
@maxsharabayko maxsharabayko force-pushed the develop/sync_09_cxx11_build_win branch from ff9fdcd to 52c33f8 Compare May 12, 2020 09:37
@maxsharabayko maxsharabayko force-pushed the develop/sync_09_cxx11_build_win branch from 52c33f8 to 76b1077 Compare May 12, 2020 09:41
@maxsharabayko maxsharabayko marked this pull request as ready for review May 12, 2020 14:44
@maxsharabayko maxsharabayko mentioned this pull request May 12, 2020
18 tasks
Development automation moved this from In Progress to Reviewer Approved May 12, 2020
@maxsharabayko
Copy link
Collaborator Author

A test case just to confirm srt::sync::CThread::id::operator==(..) is called properly.

void* func(void* th)
{
    CThread* thread = reinterpret_cast<CThread*>(th);
    cout << "Thread check. Expected true. Result: " << (thread->get_id() == srt::sync::this_thread::get_id()) << endl;
    return NULL;
}

TEST(SyncThread, OperatorCompare)
{
    CThread th;
    StartThread(th, &func, (void*) &th, "Name");
    cout << "Main check. Expected false. Result: " << (th.get_id() == srt::sync::this_thread::get_id()) << endl;

    th.join();
}

@maxsharabayko maxsharabayko merged commit b081e92 into Haivision:master May 13, 2020
Development automation moved this from Reviewer Approved to Done May 13, 2020
@maxsharabayko maxsharabayko deleted the develop/sync_09_cxx11_build_win branch May 13, 2020 08:44
@mbakholdina mbakholdina modified the milestones: v1.5.0, v1.4.2 Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Type: Maintenance Work required to maintain or clean up the code
Projects
No open projects
Development
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants