当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript SessionManager.startNew方法代码示例

本文整理汇总了TypeScript中@jupyterlab/services.SessionManager.startNew方法的典型用法代码示例。如果您正苦于以下问题:TypeScript SessionManager.startNew方法的具体用法?TypeScript SessionManager.startNew怎么用?TypeScript SessionManager.startNew使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在@jupyterlab/services.SessionManager的用法示例。


在下文中一共展示了SessionManager.startNew方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: it

      it('should connect to an existing session on the path', async () => {
        const other = await manager.startNew({ path: session.path });

        await session.initialize();
        expect(other.kernel.id).to.equal(session.kernel.id);
        other.dispose();
      });
开发者ID:willingc,项目名称:jupyterlab,代码行数:7,代码来源:clientsession.spec.ts

示例2: it

 it('should connect to an existing session on the path', () => {
   let other: Session.ISession;
   return manager.startNew({ path: session.path }).then(o => {
     other = o;
     return session.initialize();
   }).then(() => {
     expect(session.kernel.id).to.be(other.kernel.id);
     return other.dispose();
   });
 });
开发者ID:SimonBiggs,项目名称:jupyterlab,代码行数:10,代码来源:clientsession.spec.ts

示例3: it

      it('should connect to an existing kernel', async () => {
        // Shut down and dispose the session so it can be re-instantiated.
        await session.shutdown();
        session.dispose();

        const other = await manager.startNew({ path: UUID.uuid4() });
        const kernelPreference = { id: other.kernel.id };

        session = new ClientSession({ manager, kernelPreference });
        await session.initialize();
        expect(session.kernel.id).to.equal(other.kernel.id);
        // We don't call other.shutdown() here because that
        // is handled by the afterEach() handler above.
        other.dispose();
      });
开发者ID:afshin,项目名称:jupyterlab,代码行数:15,代码来源:clientsession.spec.ts


注:本文中的@jupyterlab/services.SessionManager.startNew方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。