More fixes, Linux make files.

svn path=/workspaces/charlief/; revision=15653
This commit is contained in:
Charlie Fenton 2008-07-22 13:26:52 +00:00
parent 0b181be0f0
commit 4a12ba89e7
8 changed files with 19 additions and 5 deletions

View File

@ -5943,11 +5943,13 @@ David 21 July 2008
Charlie 21 July 2008
- MGR: async GUI RPCs: Fix RPC cancel, etc. for Windows.
- MGR: async GUI RPCs: Update XCode project to include AsyncRPC.cpp,h
- MGR: async GUI RPCs: Update XCode, makefile project to include
AsyncRPC.cpp,h.
clientgui/
AsyncRPC.cpp
MainDocument.cpp,.h
makefile.am
mac_build/
boinc.xcodeproj/
project.pbxproj

View File

@ -235,11 +235,19 @@ int CMainDocument::RequestRPC(ASYNC_RPC_REQUEST& request) {
// start a new RPC thread.
if (current_rpc_request.isActive) {
current_rpc_request.isActive = false;
#if USE_CRITICAL_SECTIONS_FOR_ASYNC_RPCS
// Killing a thread while it is in a critical section
// usually causes an unrecoverable deadlock situation
m_critsect.Enter();
#endif
m_RPCThread->Pause(); // Needed on Windows
rpc.close();
m_RPCThread->Kill();
#ifdef __WXMSW__
m_RPCThread->Delete(); // Needed on Windows, crashes on Mac/Linux
#endif
#if USE_CRITICAL_SECTIONS_FOR_ASYNC_RPCS
m_critsect.Leave();
#endif
m_RPCThread = NULL;
RPC_requests.clear();
@ -436,7 +444,7 @@ void AsyncRPCDlg::OnRPCDlgTimer(wxTimerEvent& WXUNUSED(event)) {
/// For testing: triggered by Advanced / Options menu item.
void CMainDocument::TestAsyncRPC() { // TEMPORARY FOR TESTING ASYNC RPCs -- CAF
ALL_PROJECTS_LIST pl;
ALL_PROJECTS_LIST pl;
ASYNC_RPC_REQUEST request;
wxDateTime completionTime = wxDateTime((time_t)0);
int retval = 0;
@ -456,7 +464,7 @@ ALL_PROJECTS_LIST pl;
retval = RequestRPC(request);
wxString s = completionTime.Format("%X");
wxString s = completionTime.FormatTime();
wxLogMessage(wxT("Completion time = %s"), s.c_str());
wxLogMessage(wxT("RequestRPC returned %d\n"), retval);
}

View File

@ -162,4 +162,4 @@ END_DECLARE_EVENT_TYPES()
#endif // _ASYNCRPC_H_
#endif // _ASYNCRPC_H_

View File

@ -27,7 +27,7 @@
#include <vector>
#include "common_defs.h"
#include "gui_rpc_client.h"
#include "asyncRPC.h"
#include "AsyncRPC.h"
typedef struct {
int slot;

View File

@ -34,6 +34,7 @@ boinc_gui_SOURCES = \
AdvancedFrame.cpp \
AlreadyAttachedPage.cpp \
AlreadyExistsPage.cpp \
AsyncRPC.cpp \
BOINCBaseFrame.cpp \
BOINCBaseView.cpp \
BOINCBaseWizard.cpp \

View File

@ -70,6 +70,7 @@ OBJ = \
AccountManagerPropertiesPage.o \
AlreadyAttachedPage.o \
AlreadyExistsPage.o \
AsyncRPC.o \
CompletionErrorPage.o \
CompletionPage.o \
NoInternetConnectionPage.o \

View File

@ -70,6 +70,7 @@ OBJ = \
AccountManagerPropertiesPage.o \
AlreadyAttachedPage.o \
AlreadyExistsPage.o \
AsyncRPC.o \
CompletionErrorPage.o \
CompletionPage.o \
NoInternetConnectionPage.o \

View File

@ -70,6 +70,7 @@ OBJ = \
AccountManagerPropertiesPage.o \
AlreadyAttachedPage.o \
AlreadyExistsPage.o \
AsyncRPC.o \
CompletionErrorPage.o \
CompletionPage.o \
NoInternetConnectionPage.o \