[Lldb-commits] [lldb] r269377 - Fix some long standing issues that caused tests to be flaky.
    Jim Ingham via lldb-commits 
    lldb-commits at lists.llvm.org
       
    Thu May 12 16:33:00 PDT 2016
    
    
  
> On May 12, 2016, at 3:58 PM, Greg Clayton via lldb-commits <lldb-commits at lists.llvm.org> wrote:
> 
> +class EventDataReceipt : public EventData
> +{
> +public:
> +    EventDataReceipt() :
> +        EventData(),
> +        m_predicate(false)
> +    {
> +    }
> +
> +    ~EventDataReceipt() override
> +    {
> +    }
> +
> +    static const ConstString &
> +    GetFlavorString ()
> +    {
> +        static ConstString g_flavor("Process::ProcessEventData");
> +        return g_flavor;
> +    }
I don't think it is a good idea to have this general EventDataReciept claim to be a ProcessEventData.
> +
> +    const ConstString &
> +    GetFlavor () const override
> +    {
> +        return GetFlavorString();
> +    }
> +
> +    bool
> +    WaitForEventReceived (const TimeValue *abstime = nullptr, bool *timed_out = nullptr)
> +    {
> +        return m_predicate.WaitForValueEqualTo(true, abstime, timed_out);
> +    }
> +
> +private:
> +    Predicate<bool> m_predicate;
> +    
> +    void
> +    DoOnRemoval (Event *event_ptr)  override
> +    {
> +        m_predicate.SetValue(true, eBroadcastAlways);
> +    }
> +};
> +
Jim
    
    
More information about the lldb-commits
mailing list