Skip to content
Snippets Groups Projects
Commit 038a67f5 authored by Sergey Linev's avatar Sergey Linev Committed by Axel Naumann
Browse files

http: remove depricated signature of THttpServer::SubmitHttp

There is alternative with shared_ptr<> as argument
parent 5be50e93
Branches
Tags
No related merge requests found
...@@ -130,9 +130,6 @@ public: ...@@ -130,9 +130,6 @@ public:
/** Execute HTTP request */ /** Execute HTTP request */
Bool_t ExecuteHttp(std::shared_ptr<THttpCallArg> arg); Bool_t ExecuteHttp(std::shared_ptr<THttpCallArg> arg);
/** Submit HTTP request */
Bool_t SubmitHttp(THttpCallArg *arg, Bool_t can_run_immediately = kFALSE, Bool_t ownership = kFALSE) _R__DEPRECATED_618("Please use SubmitHttp(std::shared_ptr<THttpCallArg>,bool)");
/** Submit HTTP request */ /** Submit HTTP request */
Bool_t SubmitHttp(std::shared_ptr<THttpCallArg> arg, Bool_t can_run_immediately = kFALSE); Bool_t SubmitHttp(std::shared_ptr<THttpCallArg> arg, Bool_t can_run_immediately = kFALSE);
......
...@@ -613,44 +613,6 @@ Bool_t THttpServer::ExecuteHttp(THttpCallArg *arg) ...@@ -613,44 +613,6 @@ Bool_t THttpServer::ExecuteHttp(THttpCallArg *arg)
return kTRUE; return kTRUE;
} }
////////////////////////////////////////////////////////////////////////////////
/// \deprecated Signature with shared_ptr should be used
/// Submit http request, specified in THttpCallArg structure
/// Contrary to ExecuteHttp, it will not block calling thread.
/// User should reimplement THttpCallArg::HttpReplied() method
/// to react when HTTP request is executed.
/// Method can be called from any thread
/// Actual execution will be done in main ROOT thread, where analysis code is running.
/// When called from main thread and can_run_immediately==kTRUE, will be
/// executed immediately.
/// If ownership==kTRUE, THttpCallArg object will be destroyed by the THttpServer
/// Returns kTRUE when was executed.
Bool_t THttpServer::SubmitHttp(THttpCallArg *arg, Bool_t can_run_immediately, Bool_t ownership)
{
if (fTerminated) {
if (ownership)
delete arg;
return kFALSE;
}
if (can_run_immediately && (fMainThrdId != 0) && (fMainThrdId == TThread::SelfId())) {
ProcessRequest(arg);
arg->NotifyCondition();
if (ownership)
delete arg;
return kTRUE;
}
// add call arg to the list
std::unique_lock<std::mutex> lk(fMutex);
if (ownership)
fArgs.push(std::shared_ptr<THttpCallArg>(arg));
else
fCallArgs.Add(arg);
return kFALSE;
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// Submit http request, specified in THttpCallArg structure /// Submit http request, specified in THttpCallArg structure
/// Contrary to ExecuteHttp, it will not block calling thread. /// Contrary to ExecuteHttp, it will not block calling thread.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment