Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] Re: The timeout in the DbgpDebuggingEngineCommunicator.communicate()

Yes, you are right - if those fields are already in the preferences dialog - the code should be fixed to use them.

Johan Compagner wrote:
i just checked for preferences and there are already preferences specified for that
but never used (as far as i see)

    // Time to wait of connection debugging engine to the IDE
public static final String PREF_DBGP_CONNECTION_TIMEOUT = "dbgp_connection_timeout"; //$NON-NLS-1$

    // Time to wait after sending DBGP request to the debugging engine
public static final String PREF_DBGP_RESPONSE_TIMEOUT = "dbgp_response_timeout"; //$NON-NLS-1$

        prefs.setDefault(
                DLTKDebugPreferenceConstants.PREF_DBGP_CONNECTION_TIMEOUT,
                10000);

        prefs.setDefault(
DLTKDebugPreferenceConstants.PREF_DBGP_RESPONSE_TIMEOUT, 10000);


shouldnt these just be used?

johan



On Thu, Jul 3, 2008 at 2:40 PM, Alex Panchenko <alex@xxxxxxxxx <mailto:alex@xxxxxxxxx>> wrote:

    Hi Johan,


    Johan Compagner wrote:

        i guess the better code would be this:

                   long endTime = 0;
                   if (timeout > 0) {
                       endTime = System.currentTimeMillis() + timeout;
                   }
                   while (!terminated && !map.containsKey(key)) {
                       long current = System.currentTimeMillis();
                       if (endTime != 0 && current >= endTime) {
                           break;
                       }
                       if (endTime == 0)
                           wait();
                       else
                           wait(endTime - current);
                   }

         Then it really waits for ever if timeout == 0
        else it will wait until the endTime which is current time +
        timeout.

    Yes, please commit your code.

        The problem is that this still doesnt fix my problem :)
        Can i make a preference of that timeout? That i can then set
        in my plugin_customization.ini?

    May be we can just increase the timeout to about 1 hour for now? I
    have committed that line.

    Alex
    _______________________________________________
    dltk-dev mailing list
    dltk-dev@xxxxxxxxxxx <mailto:dltk-dev@xxxxxxxxxxx>
    https://dev.eclipse.org/mailman/listinfo/dltk-dev


------------------------------------------------------------------------

_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev


Back to the top